KVM: SVM: Fix x2AVIC MSR interception issues
Status from this message: Applied to kvm-x86 svm, with a fixed blurb for ARBPRI (hopefully :-D).
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 4 repliesApplied
- v25 patches 15 repliesSuperseded
- v13 patches 5 repliesSuperseded
Changes in v3 from the cover letter
- 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]
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | KVM: x86: Add dedicated API for getting mask of accelerated x2APIC MSRsarch/ arch/ arch/ | +21 | 1 reply | |
| 2/3 | KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually supportsarch/ | +11 | 2 replies | |
| 3/3 | KVM: SVM: Only disable x2AVIC WRMSR interception for MSRs that are acceleratedarch/ | +4 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Naveen N Rao (AMD) |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] KVM: SVM: Fix x2AVIC MSR interception issues
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/[email protected]
- 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/[email protected]
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
Signature · 1 line
2.54.0.563.g4f69b47b94-goog