forked from Minki/linux
KVM: apic: fix LDR calculation in x2apic mode
Signed-off-by: Gleb Natapov <gleb@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
f3ac1a4b66
commit
7f46ddbd48
@ -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 &
|
||||
|
Loading…
Reference in New Issue
Block a user