On Wed, Feb 05, 2025, James Houghton wrote: > From: Sean Christopherson <seanjc@xxxxxxxxxx> > > Re-introduce the "split" x2APIC ICR storage that KVM used prior to Intel's > IPI virtualization support, but only for AMD. While not stated anywhere > in the APM, despite stating the ICR is a single 64-bit register, AMD CPUs > store the 64-bit ICR as two separate 32-bit values in ICR and ICR2. When > IPI virtualization (IPIv on Intel, all AVIC flavors on AMD) is enabled, > KVM needs to match CPU behavior as some ICR ICR writes will be handled by > the CPU, not by KVM. > > Add a kvm_x86_ops knob to control the underlying format used by the CPU to > store the x2APIC ICR, and tune it to AMD vs. Intel regardless of whether > or not x2AVIC is enabled. If KVM is handling all ICR writes, the storage > format for x2APIC mode doesn't matter, and having the behavior follow AMD > versus Intel will provide better test coverage and ease debugging. > > Fixes: 4d1d7942e36a ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") > Cc: stable@xxxxxxxxxxxxxxx > Cc: Maxim Levitsky <mlevitsk@xxxxxxxxxx> > Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> > Link: https://lore.kernel.org/r/20240719235107.3023592-4-seanjc@xxxxxxxxxx > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> > (cherry picked from commit 73b42dc69be8564d4951a14d00f827929fe5ef79) Same nit on the upstream info here. Don't think it warrants a v2? (that's a question for Sasha and/or Greg). Acked-by: Sean Christopherson <seanjc@xxxxxxxxxx>