Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] KVM: x86: Virtualize AMD CPUID faulting
@ 2026-05-08 17:07 Jim Mattson
  2026-05-08 17:07 ` [PATCH v2 1/3] KVM: x86: Remove supports_cpuid_fault() helper Jim Mattson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jim Mattson @ 2026-05-08 17:07 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, Shuah Khan,
	kvm, linux-kernel, linux-kselftest, Clayton Pence
  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.

v1 -> v2:
* Remove supports_cpuid_fault() instead of renaming it [Sean]

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

Jim Mattson (3):
  KVM: x86: Remove supports_cpuid_fault() helper
  KVM: x86: Virtualize AMD CPUID faulting
  KVM: selftests: Update hwcr_msr_test for CPUID faulting bit

 arch/x86/kvm/cpuid.c                          |  2 +-
 arch/x86/kvm/cpuid.h                          | 11 ++++------
 arch/x86/kvm/emulate.c                        | 14 +++++++------
 arch/x86/kvm/x86.c                            | 21 ++++++++++++-------
 .../testing/selftests/kvm/x86/hwcr_msr_test.c | 10 ++++-----
 5 files changed, 32 insertions(+), 26 deletions(-)


base-commit: 85f871f6ba46f20d7fbc0b016b4db648c33220dd
-- 
2.54.0.563.g4f69b47b94-goog


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

end of thread, other threads:[~2026-05-08 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 17:07 [PATCH v2 0/3] KVM: x86: Virtualize AMD CPUID faulting Jim Mattson
2026-05-08 17:07 ` [PATCH v2 1/3] KVM: x86: Remove supports_cpuid_fault() helper Jim Mattson
2026-05-08 17:07 ` [PATCH v2 2/3] KVM: x86: Virtualize AMD CPUID faulting Jim Mattson
2026-05-08 17:07 ` [PATCH v2 3/3] KVM: selftests: Update hwcr_msr_test for CPUID faulting bit Jim Mattson

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