summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-06-12 11:54:59 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2026-06-24 07:52:24 -0400
commit098e32cba334da0f3fa8cfd4e022ae7c72341400 (patch)
treef3a302d6c348a89f7dd6474f23f0b97ea0c9d4a6 /include
parent02953418a1378514d1f4086180f14004f5d08ea5 (diff)
downloadlwn-098e32cba334da0f3fa8cfd4e022ae7c72341400.tar.gz
lwn-098e32cba334da0f3fa8cfd4e022ae7c72341400.zip
x86/apic: KVM: Use cpu_physical_id() to get APIC ID of running vCPU for AVIC
Use cpu_physical_id() instead of default_cpu_present_to_apicid() when getting the APIC ID of the pCPU on which a vCPU is running/loaded, as the kernel has gone way off the rails if a vCPU is loaded on a pCPU that has been physically removed from the system. Even if the impossible were to happen, the absolutely worst case scenario is that hardware will ring the AIVC doorbell on the wrong pCPU, i.e. a severely broken system will experience mild performance issues. Kill off KVM's superfluous kvm_cpu_get_apicid() wrapper along with the for-KVM export of default_cpu_present_to_apicid(), as they existed purely for the wonky AVIC usage. Cc: Kai Huang <kai.huang@intel.com> Cc: Yosry Ahmed <yosry@kernel.org> Signed-off-by: Sean Christopherson <seanjc@google.com> Acked-by: Naveen N Rao (AMD) <naveen@kernel.org> Reviewed-by: Kai Huang <kai.huang@intel.com> Reviewed-by: Yosry Ahmed <yosry@kernel.org> Message-ID: <20260612185459.591892-1-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions