public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: SVM: Fix CR8 intercpetion woes with AVIC
@ 2026-02-03 19:07 Sean Christopherson
  2026-02-03 19:07 ` [PATCH 1/2] KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with in-kernel APIC Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Sean Christopherson @ 2026-02-03 19:07 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Jim Mattson, Naveen N Rao,
	Maciej S . Szmigiero

Fix a bug (or rather, a class of bugs) where SVM leaves the CR8 write
intercept enabled after AVIC is enabled.  On its own, the dangling CR8
intercept is "just" a performance issue.  But combined with the TPR sync bug
fixed by commit d02e48830e3f ("KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR
even if AVIC is active"), the danging intercept is fatal to Windows guests as
the TPR seen by hardware gets wildly out of sync with reality.

Tagged for stable even though there shouldn't be functional issues so long as
the TPR sync bug is fixed, because (a) write_cr8 exits can represent the
overwhelming majority of exits (hence the quotes around "just" a performance
issue), and (b) running with a bad/wrong configuration increases the chances
of encountering other lurking TPR bugs (if there are any), i.e. of hitting
bugs that would otherwise be rare edge (which is good for testing, but bad
for production).

Sean Christopherson (2):
  KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with
    in-kernel APIC
  KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated

 arch/x86/kvm/svm/avic.c |  8 +++++---
 arch/x86/kvm/svm/svm.c  | 11 ++++++-----
 2 files changed, 11 insertions(+), 8 deletions(-)


base-commit: e944fe2c09f405a2e2d147145c9b470084bc4c9a
-- 
2.53.0.rc2.204.g2597b5adb4-goog


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

end of thread, other threads:[~2026-03-11 17:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 19:07 [PATCH 0/2] KVM: SVM: Fix CR8 intercpetion woes with AVIC Sean Christopherson
2026-02-03 19:07 ` [PATCH 1/2] KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with in-kernel APIC Sean Christopherson
2026-02-05  4:21   ` Jim Mattson
2026-02-06 14:00   ` Naveen N Rao
2026-02-06 18:17     ` Sean Christopherson
2026-02-09 10:23       ` Naveen N Rao
2026-02-09 21:36         ` Sean Christopherson
2026-02-03 19:07 ` [PATCH 2/2] KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated Sean Christopherson
2026-02-05  4:22   ` Jim Mattson
2026-02-06 17:11   ` Naveen N Rao
2026-02-06 17:55     ` Sean Christopherson
2026-03-10 15:41   ` Aithal, Srikanth
2026-03-10 17:17     ` Sean Christopherson
2026-03-10 17:36       ` Tom Lendacky
2026-03-10 17:48         ` Naveen N Rao
2026-03-10 18:00           ` Naveen N Rao
2026-03-10 18:12           ` Tom Lendacky
2026-03-10 18:35             ` Sean Christopherson
2026-03-10 21:41               ` Tom Lendacky
2026-03-10 21:58                 ` Sean Christopherson
2026-03-10 22:33                   ` Tom Lendacky
2026-03-10 22:40                     ` Sean Christopherson
2026-03-11 13:43                       ` Tom Lendacky
2026-03-11 17:39                     ` Paolo Bonzini
2026-03-05 17:07 ` [PATCH 0/2] KVM: SVM: Fix CR8 intercpetion woes with AVIC Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox