From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: apic: fix LDR calculation in x2apic mode Date: Thu, 18 Oct 2012 16:33:49 +0200 Message-ID: <5080134D.1060001@redhat.com> References: <20121014110858.GN16648@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Chegu Vinod , mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53298 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411Ab2JROeQ (ORCPT ); Thu, 18 Oct 2012 10:34:16 -0400 In-Reply-To: <20121014110858.GN16648@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/14/2012 01:08 PM, Gleb Natapov wrote: > Signed-off-by: Gleb Natapov > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > index c6e6b72..43e9fad 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value) > vcpu->arch.apic_base = value; > if (apic_x2apic_mode(apic)) { > u32 id = kvm_apic_id(apic); > - u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf)); > + u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf)); > kvm_apic_set_ldr(apic, ldr); > } Thanks, applied to master for 3.7. -- error compiling committee.c: too many arguments to function