]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: use hardware-compatible format for APIC ID register
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 12 Jul 2016 20:09:22 +0000 (22:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Jul 2016 07:03:54 +0000 (09:03 +0200)
commit7d6a66044c7da3066acbbe14d398a2e84c117a7e
treec3489b65740c2948918a53b08a1718c5c4771d9e
parentea89228f246bed2c6764997365f4970f90960abc
KVM: x86: use hardware-compatible format for APIC ID register

We currently always shift APIC ID as if APIC was in xAPIC mode.
x2APIC mode wants to use more bits and storing a hardware-compabible
value is the the sanest option.

KVM API to set the lapic expects that bottom 8 bits of APIC ID are in
top 8 bits of APIC_ID register, so the register needs to be shifted in
x2APIC mode.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c