All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: apic: fix LDR calculation in x2apic mode
@ 2012-10-14 11:08 Gleb Natapov
  2012-10-14 13:41 ` Chegu Vinod
  2012-10-18 14:33 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2012-10-14 11:08 UTC (permalink / raw)
  To: kvm; +Cc: Chegu Vinod, avi, mtosatti

Signed-off-by: Gleb Natapov <gleb@redhat.com>
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);
 	}
 	apic->base_address = apic->vcpu->arch.apic_base &
--
			Gleb.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-18 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 11:08 [PATCH] KVM: apic: fix LDR calculation in x2apic mode Gleb Natapov
2012-10-14 13:41 ` Chegu Vinod
2012-10-18 14:33 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.