kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: jan.kiszka@siemens.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: x86: fix apic_base enable check
Date: Wed, 15 Jan 2014 13:40:58 +0100	[thread overview]
Message-ID: <52D681DA.5010005@redhat.com> (raw)
In-Reply-To: <1389789599-20729-1-git-send-email-drjones@redhat.com>

Il 15/01/2014 13:39, Andrew Jones ha scritto:
> Commit e66d2ae7c67bd moved the assignment
> vcpu->arch.apic_base = value above a condition with
> (vcpu->arch.apic_base ^ value), causing that check
> to always fail. Use old_value, vcpu->arch.apic_base's
> old value, in the condition instead.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  arch/x86/kvm/lapic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 1673940cf9c35..775702f649ca6 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1355,7 +1355,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
>  	vcpu->arch.apic_base = value;
>  
>  	/* update jump label if enable bit changes */
> -	if ((vcpu->arch.apic_base ^ value) & MSR_IA32_APICBASE_ENABLE) {
> +	if ((old_value ^ value) & MSR_IA32_APICBASE_ENABLE) {
>  		if (value & MSR_IA32_APICBASE_ENABLE)
>  			static_key_slow_dec_deferred(&apic_hw_disabled);
>  		else
> 

Thanks Drew, applying this patch to master branch.

  reply	other threads:[~2014-01-15 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 12:39 [PATCH] kvm: x86: fix apic_base enable check Andrew Jones
2014-01-15 12:40 ` Paolo Bonzini [this message]
2014-01-16  7:38   ` Jan Kiszka

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=52D681DA.5010005@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=drjones@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).