• Radim Krčmář's avatar
    KVM: x86: use correct APIC ID on x2APIC transition · 257b9a5f
    Radim Krčmář authored
    SDM April 2015, 10.12.5 State Changes From xAPIC Mode to x2APIC Mode
    • Any APIC ID value written to the memory-mapped local APIC ID register
      is not preserved.
    
    Fix it by sourcing vcpu_id (= initial APIC ID) instead of memory-mapped
    APIC ID.  Proper use of apic functions would result in two calls to
    recalculate_apic_map(), so this patch makes a new helper.
    
    Signed-off-by: Radim KrčmáŠ<rkrcmar@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    257b9a5f
lapic.c 51.1 KB