public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, linux-kernel@vger.kernel.org
Cc: x86@kernel.org, hpa@zytor.com, mingo@redhat.com,
	tglx@linutronix.de, kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH 2/2] x86: kvm: do not advertise stable clocksource if CPU has TSC drift BUG
Date: Thu, 31 Jul 2014 16:38:49 +0200	[thread overview]
Message-ID: <53DA54F9.8090605@redhat.com> (raw)
In-Reply-To: <1406800033-13404-3-git-send-email-imammedo@redhat.com>

Il 31/07/2014 11:47, Igor Mammedov ha scritto:
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  arch/x86/kvm/cpuid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 38a0afe..f519823 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -478,8 +478,9 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
>  			     (1 << KVM_FEATURE_CLOCKSOURCE2) |
>  			     (1 << KVM_FEATURE_ASYNC_PF) |
>  			     (1 << KVM_FEATURE_PV_EOI) |
> -			     (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT) |
>  			     (1 << KVM_FEATURE_PV_UNHALT);
> +		if (!static_cpu_has_bug(X86_BUG_AMD_TSC_DRIFT))
> +			entry->eax |= (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT);
>  
>  		if (sched_info_on())
>  			entry->eax |= (1 << KVM_FEATURE_STEAL_TIME);
> 

Marcelo, is there anything we can do if the VM migrates from a sane host
to a buggy one?

Paolo

      reply	other threads:[~2014-07-31 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31  9:47 [PATCH 0/2] Avoid using TSC clocksource on AMD APUs affected by erratum 778 Igor Mammedov
2014-07-31  9:47 ` [PATCH 1/2] x86: AMD: mark TSC unstable on APU family 15h models 10h-1fh Igor Mammedov
2014-07-31 15:47   ` Borislav Petkov
2014-07-31 16:33     ` Paolo Bonzini
2014-08-01  9:02   ` Borislav Petkov
2014-07-31  9:47 ` [PATCH 2/2] x86: kvm: do not advertise stable clocksource if CPU has TSC drift BUG Igor Mammedov
2014-07-31 14:38   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53DA54F9.8090605@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=hpa@zytor.com \
    --cc=imammedo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox