Skip to content

KVM: x86: x2APIC reserved bits/regs fixes

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Applied to kvm-x86 apic, thanks past me!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPIarch/x86/kvm/lapic.c+7 -31 reply
2/6KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32arch/x86/kvm/lapic.c+5 -11 reply
3/6KVM: x86: Mark x2APIC DFR reg as non-existent for x2APICarch/x86/kvm/lapic.c+4 -71 reply
4/6KVM: x86: Split out logic to generate "readable" APIC regs mask to helperarch/x86/kvm/lapic.c arch/x86/kvm/lapic.h+23 -131 reply
5/6KVM: VMX: Always intercept accesses to unsupported "extended" x2APIC regsarch/x86/kvm/vmx/vmx.c+20 -183 replies
6/6KVM: VMX: Intercept reads to invalid and write-only x2APIC registersarch/x86/kvm/vmx/vmx.c+4 -41 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchMaxim LevitskyJim Mattson
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] KVM: x86: x2APIC reserved bits/regs fixes

Fixes for edge cases where KVM mishandles reserved bits/regs checks when the vCPU is in x2APIC mode.

The first two patches were previously posted[*], but both patches were broken (as posted against upstream), hence I took full credit for doing the work and changed Marc to a reporter.

The VMX APICv fixes are for bugs found when writing tests. *sigh* I didn't Cc those to stable as the odds of breaking something when touching the MSR bitmaps seemed higher than someone caring about a 10 year old bug.

AMD x2AVIC support may or may not suffer similar interception bugs, but I don't have hardware to test and this already snowballed further than expected...

[*] https://lore.kernel.org/kvm/[email protected]

Sean Christopherson (6):
KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPI
KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
KVM: x86: Mark x2APIC DFR reg as non-existent for x2APIC
KVM: x86: Split out logic to generate "readable" APIC regs mask to
helper
KVM: VMX: Always intercept accesses to unsupported "extended" x2APIC
regs
KVM: VMX: Intercept reads to invalid and write-only x2APIC registers

 arch/x86/kvm/lapic.c   | 55 ++++++++++++++++++++++++++----------------
 arch/x86/kvm/lapic.h   |  2 ++
 arch/x86/kvm/vmx/vmx.c | 40 +++++++++++++++---------------
 3 files changed, 57 insertions(+), 40 deletions(-)

base-commit: 91dc252b0dbb6879e4067f614df1e397fec532a1

Signature · 1 line
2.39.0.314.g84b9a713c41-goog