All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.18.y v2 0/6] KVM: x86: CPUID faulting fixes and AMD CPUID faulting virtualization
@ 2026-10-15 16:03 Anil Altinay
  2026-10-15 16:03 ` [PATCH 6.18.y v2 1/6] KVM: x86: Ignore cpuid faulting in SMM Anil Altinay
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Anil Altinay @ 2026-10-15 16:03 UTC (permalink / raw)
  To: stable; +Cc: Jim Mattson, Sean Christopherson, Paolo Bonzini, kvm,
	Anil Altinay

Please backport the following 6 upstream commits to the 6.18.y stable tree:

1. 690dc03859e7 ("KVM: x86: Ignore cpuid faulting in SMM") [v7.1-rc1]
2. cf7d65d1d6f5 ("KVM: x86: Consolidate CPUID fault handling for emulator and interception logic") [v7.2-rc1]
3. be7fd7c3e8bc ("KVM: x86: Prioritize CPUID faulting over CPUID VM-exits in nested VMX") [v7.2-rc1]
4. d1bc99885a59 ("KVM: x86: Remove supports_cpuid_fault() helper") [v7.2-rc1]
5. e93a93f11490 ("KVM: x86: Virtualize AMD CPUID faulting") [v7.2-rc1]
6. b16c2aca369d ("KVM: selftests: Update hwcr_msr_test for CPUID faulting bit") [v7.2-rc1]

Patches 1 and 3 fix bugs in KVM's CPUID faulting virtualization (Fixes:
db2336a80489 ("KVM: x86: virtualize cpuid faulting")), ensuring that
CPUID does not fault in SMM and that CPUID faulting takes precedence
over CPUID VM-exits in nested VMX. Patch 2 is a non-functional refactoring
prerequisite for patch 3.

Patches 4-6 extend KVM's CPUID faulting virtualization (already supported
by KVM on Intel CPUs and by 6.18 host kernels on AMD CPUs via 65f55a301766
("x86/CPU/AMD: Add CPUID faulting support")) to AMD guests via
CPUID.80000021H:EAX.CpuidUserDis[bit 17] and HWCR.CpuidUserDis[bit 35],
allowing guests and container runtimes that rely on arch_prctl(ARCH_SET_CPUID)
to work uniformly across Intel and AMD KVM hosts, along with the
corresponding KVM selftest update.

All patches cherry-pick cleanly to 6.18.y except for a minor context
conflict in patch 2 (arch/x86/include/asm/kvm_host.h) and a u64 vs.
uint64_t type adjustment in patch 6 (tools/testing/selftests/kvm/x86/hwcr_msr_test.c).

Changes in v2:
- Include KVM maintainers and kvm@vger.kernel.org on Cc across the series
  (omitted in v1 due to --suppress-cc=all).
- Link to v1: https://lore.kernel.org/stable/20261014212844.11997-1-aaltinay@google.com/

Jim Mattson (5):
  KVM: x86: Ignore cpuid faulting in SMM
  KVM: x86: Prioritize CPUID faulting over CPUID VM-exits in nested VMX
  KVM: x86: Remove supports_cpuid_fault() helper
  KVM: x86: Virtualize AMD CPUID faulting
  KVM: selftests: Update hwcr_msr_test for CPUID faulting bit

Sean Christopherson (1):
  KVM: x86: Consolidate CPUID fault handling for emulator and
    interception logic

 arch/x86/include/asm/kvm_host.h               |  1 -
 arch/x86/include/asm/msr-index.h              |  1 +
 arch/x86/kvm/cpuid.c                          |  6 ++-
 arch/x86/kvm/cpuid.h                          | 14 ++++---
 arch/x86/kvm/emulate.c                        |  6 +--
 arch/x86/kvm/kvm_emulate.h                    |  1 +
 arch/x86/kvm/vmx/nested.c                     |  2 +
 arch/x86/kvm/x86.c                            | 39 ++++++++++---------
 .../selftests/kvm/include/x86/processor.h     |  1 +
 .../testing/selftests/kvm/x86/hwcr_msr_test.c |  9 ++++-
 10 files changed, 46 insertions(+), 34 deletions(-)

-- 
2.56.0.385.gd3acb90ef8-goog


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

end of thread, other threads:[~2026-10-16  1:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 16:03 [PATCH 6.18.y v2 0/6] KVM: x86: CPUID faulting fixes and AMD CPUID faulting virtualization Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 1/6] KVM: x86: Ignore cpuid faulting in SMM Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 2/6] KVM: x86: Consolidate CPUID fault handling for emulator and interception logic Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 3/6] KVM: x86: Prioritize CPUID faulting over CPUID VM-exits in nested VMX Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 4/6] KVM: x86: Remove supports_cpuid_fault() helper Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 5/6] KVM: x86: Virtualize AMD CPUID faulting Anil Altinay
2026-10-15 16:03 ` [PATCH 6.18.y v2 6/6] KVM: selftests: Update hwcr_msr_test for CPUID faulting bit Anil Altinay
2026-10-16  1:09 ` [PATCH 6.18.y v2 0/6] KVM: x86: CPUID faulting fixes and AMD CPUID faulting virtualization 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.