All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] KVM: SVM: Fix x2AVIC MSR interception issues
@ 2026-05-14 21:31 Sean Christopherson
  2026-05-14 21:31 ` [PATCH v3 1/3] KVM: x86: Add dedicated API for getting mask of accelerated x2APIC MSRs Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sean Christopherson @ 2026-05-14 21:31 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Naveen N Rao

Fix a variety of bugs in SVM's handling of x2APIC MSR passthrough for x2AVIC,
where KVM disables interception for MSR accesses that aren't accelerated by
hardware (pointless and suboptimal), and also does NOT disable interception
for practically any of the "range of vectors" MSRs, i.e. IRR, ISR, and TMR.

Note, I tagged all of this for stable, but I could be convinced these fixes
shouldn't be sent to LTS trees, as there are no functional bugs being fixed.

v3:
 - Consolidate list generation for APICv and x2AVIC RDMSR passthrough (and
   avoid the wonky post-iteration fixup in the process). [Naveen]
 - Collect reviews. [Naveen]
 - Drop the hacky selftest (it's still available in v2).
 - Massage the changelog for patch 3 to call out that at least one section
   of the APM does document that #GP has priority over the AVIC checks.
   [Naveen]
 - Document the impact on TMCCT in patch 2. [Naveen]

v2:
 - https://lore.kernel.org/all/20260506184746.2719880-1-seanjc@google.com
 - Actually iterate over the mask of readable regs. [Naveen]
 - Rewrite the changelog for patch 3 to more accurately capture what happens,
   and to avoid conflating "unaccelerated" with "fault-like". [Naveen]
 - Massage the changlog for patch 1 to describe the observed behavior of
   DFR and ICR2.
 - Test the #VMEXIT (or not) behavior with hacks (patches 4 and 5).

v1: https://lore.kernel.org/all/20260409222449.2013847-1-seanjc@google.com

Sean Christopherson (3):
  KVM: x86: Add dedicated API for getting mask of accelerated x2APIC
    MSRs
  KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually
    supports
  KVM: SVM: Only disable x2AVIC WRMSR interception for MSRs that are
    accelerated

 arch/x86/kvm/lapic.c    | 21 ++++++++++++++++--
 arch/x86/kvm/lapic.h    |  2 +-
 arch/x86/kvm/svm/avic.c | 47 +++++++++++------------------------------
 arch/x86/kvm/vmx/vmx.c  |  3 +--
 4 files changed, 33 insertions(+), 40 deletions(-)


base-commit: a9512a611bd030088f13477258d1f8103cceaa40
-- 
2.54.0.563.g4f69b47b94-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-15 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 21:31 [PATCH v3 0/3] KVM: SVM: Fix x2AVIC MSR interception issues Sean Christopherson
2026-05-14 21:31 ` [PATCH v3 1/3] KVM: x86: Add dedicated API for getting mask of accelerated x2APIC MSRs Sean Christopherson
2026-05-15 14:18   ` Naveen N Rao
2026-05-14 21:31 ` [PATCH v3 2/3] KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually supports Sean Christopherson
2026-05-15 14:19   ` Naveen N Rao
2026-05-14 21:31 ` [PATCH v3 3/3] KVM: SVM: Only disable x2AVIC WRMSR interception for MSRs that are accelerated Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.