Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v4 0/5] KVM: x86: Virtualize AMD's "disable CPUID in usermode"
@ 2026-05-27 17:43 Jim Mattson
  2026-05-27 17:43 ` [PATCH v4 1/5] KVM: x86: Consolidate CPUID fault handling for emulator and interception logic Jim Mattson
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Jim Mattson @ 2026-05-27 17:43 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, shuah,
	kvm, linux-kernel, linux-kselftest, ctpence, David.Kaplan,
	binbin.wu
  Cc: Jim Mattson

AMD's "disable CPUID in usermode" feature is analogous to Intel's "CPUID
faulting" feature, but it is advertised and activated differently.  The AMD
feature is advertised via CPUID.80000021H:EAX.CpuidUserDis[bit 17] and
activated by setting HWCR.CpuidUserDis[bit 35].

Add virtualization support for the AMD feature.

v3 -> v4:
 * Fix typo in commit message for patch 1 [Binbin]
 * Fix #GP/CPUID VM-exit precedence in nested VMX [Sashiko]
 * Add EXPORT_STATIC_CALL_GPL(kvm_x86_get_cpl)

v1: https://lore.kernel.org/kvm/20260402223108.650572-1-jmattson@google.com/
v2: https://lore.kernel.org/kvm/20260508170714.489136-1-jmattson@google.com/
v3: https://lore.kernel.org/kvm/20260513224608.1859737-1-jmattson@google.com/

Jim Mattson (4):
  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                          |  7 ++--
 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(+), 35 deletions(-)

-- 
2.54.0.794.g4f17f83d09-goog


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

end of thread, other threads:[~2026-05-29 22:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27 17:43 [PATCH v4 0/5] KVM: x86: Virtualize AMD's "disable CPUID in usermode" Jim Mattson
2026-05-27 17:43 ` [PATCH v4 1/5] KVM: x86: Consolidate CPUID fault handling for emulator and interception logic Jim Mattson
2026-05-28  9:13   ` Peter Zijlstra
2026-05-28 14:20     ` Jim Mattson
2026-05-28 16:08       ` Sean Christopherson
2026-05-28 16:06     ` Sean Christopherson
2026-05-27 17:43 ` [PATCH v4 2/5] KVM: x86: Prioritize CPUID faulting over CPUID VM-exits in nested VMX Jim Mattson
2026-05-27 17:43 ` [PATCH v4 3/5] KVM: x86: Remove supports_cpuid_fault() helper Jim Mattson
2026-05-27 17:43 ` [PATCH v4 4/5] KVM: x86: Virtualize AMD CPUID faulting Jim Mattson
2026-05-27 17:43 ` [PATCH v4 5/5] KVM: selftests: Update hwcr_msr_test for CPUID faulting bit Jim Mattson
2026-05-29 22:47 ` [PATCH v4 0/5] KVM: x86: Virtualize AMD's "disable CPUID in usermode" Sean Christopherson

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