]> Git Repo - linux.git/commit
KVM: SVM: Allow AVIC support on system w/ physical APIC ID > 255
authorSuravee Suthikulpanit <[email protected]>
Fri, 11 Feb 2022 00:08:51 +0000 (18:08 -0600)
committerPaolo Bonzini <[email protected]>
Tue, 8 Mar 2022 15:59:12 +0000 (10:59 -0500)
commit4a204f7895878363ca8211f50ec610408c8c70aa
tree4abc3852f1696d98f292016df434c3675d82619c
parentb58c55d522b256fa54c5e9175cf3202bc452b20e
KVM: SVM: Allow AVIC support on system w/ physical APIC ID > 255

Expand KVM's mask for the AVIC host physical ID to the full 12 bits defined
by the architecture.  The number of bits consumed by hardware is model
specific, e.g. early CPUs ignored bits 11:8, but there is no way for KVM
to enumerate the "true" size.  So, KVM must allow using all bits, else it
risks rejecting completely legal x2APIC IDs on newer CPUs.

This means KVM relies on hardware to not assign x2APIC IDs that exceed the
"true" width of the field, but presumably hardware is smart enough to tie
the width to the max x2APIC ID.  KVM also relies on hardware to support at
least 8 bits, as the legacy xAPIC ID is writable by software.  But, those
assumptions are unavoidable due to the lack of any way to enumerate the
"true" width.

Cc: [email protected]
Cc: Maxim Levitsky <[email protected]>
Suggested-by: Sean Christopherson <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Fixes: 44a95dae1d22 ("KVM: x86: Detect and Initialize AVIC support")
Signed-off-by: Suravee Suthikulpanit <[email protected]>
Message-Id: <20220211000851[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/include/asm/svm.h
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.h
This page took 0.051684 seconds and 4 git commands to generate.