Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH v2 0/9] KVM: selftests: Add Zhaoxin CPU support
@ 2026-09-10 11:54 Ewan Hai-oc
  2026-09-10 11:54 ` [PATCH v2 1/9] KVM: selftests: Add Zhaoxin CPU detection support Ewan Hai-oc
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Ewan Hai-oc @ 2026-09-10 11:54 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: Shuah Khan, Frank Zhu, kvm, linux-kselftest, linux-kernel,
	ewanhai, cobechen

From: Frank Zhu <frankzhu@zhaoxin.com>

This series adds Zhaoxin CPU support to the KVM x86 selftests.

Zhaoxin CPUs use the "CentaurHauls" and "  Shanghai  " vendor strings
and implement VMX-compatible virtualization, so KVM handles them via
its VMX backend.  Several selftests currently assume a CPU is either
Intel or AMD, which makes them misbehave or skip on Zhaoxin hosts.

Patch 1 adds Zhaoxin detection and the compatibility flag. Patch 2
updates the mediated PMU parameter lookup. Patches 3-5 and 7 apply the
compatibility flag to VMX-backed paths. Patch 6 handles feature MSR
testing without PDCM, patch 8 handles Zhaoxin's #GP error-code behavior,
and patch 9 checks APIC-access virtualization support.

Frank Zhu (9):
  KVM: selftests: Add Zhaoxin CPU detection support
  KVM: selftests: Use host_cpu_is_intel_compatible for mediated PMU
  KVM: selftests: nx_huge_pages_test: Add TDP detection for Zhaoxin CPUs
  KVM: selftests: vmx_exception_with_invalid_guest_state: Support
    Zhaoxin CPUs
  KVM: selftests: fix_hypercall_test: Add Zhaoxin CPU support
  KVM: selftests: Skip PERF_CAPABILITIES vCPU checks without PDCM
  KVM: selftests: feature_msrs_test: Extend MSR_IA32_UCODE_REV quirk to
    Zhaoxin
  KVM: selftests: nested_exceptions_test: Add Zhaoxin CPU support
  KVM: selftests: vmx_apic_access_test: Check APIC virtualization
    support

 .../testing/selftests/kvm/include/x86/processor.h | 10 +++++++++-
 tools/testing/selftests/kvm/include/x86/vmx.h     |  1 +
 tools/testing/selftests/kvm/lib/x86/processor.c   |  8 +++++++-
 tools/testing/selftests/kvm/lib/x86/vmx.c         | 15 +++++++++++++++
 .../testing/selftests/kvm/x86/feature_msrs_test.c | 15 ++++++++++++++-
 .../selftests/kvm/x86/fix_hypercall_test.c        |  2 +-
 .../selftests/kvm/x86/nested_exceptions_test.c    |  4 +++-
 .../selftests/kvm/x86/vmx_apic_access_test.c      |  1 +
 .../x86/vmx_exception_with_invalid_guest_state.c  |  2 +-
 9 files changed, 52 insertions(+), 6 deletions(-)

Changes since v1:
- Rebase the series onto kvm-x86/next.
- Spell out Zhaoxin in helper, macro, and patch names.
- Add a new patch (2/9) to use host_cpu_is_intel_compatible in
  kvm_is_mediated_pmu_enabled() so Zhaoxin CPUs look up the mediated
  PMU parameter from kvm_intel.
- Reword the Zhaoxin CPU detection commit message to document the new
  host_cpu_is_intel_compatible flag.
- Expand the nested_exceptions_test commit message to explain why
  Zhaoxin CPUs leave EXT clear for the #GP generated when vectoring
  an injected #SS.

base-commit: 76671054f9a1ff6abb976583cd8da37650acdc97
-- 
2.34.1


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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 11:54 [PATCH v2 0/9] KVM: selftests: Add Zhaoxin CPU support Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 1/9] KVM: selftests: Add Zhaoxin CPU detection support Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 2/9] KVM: selftests: Use host_cpu_is_intel_compatible for mediated PMU Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 3/9] KVM: selftests: nx_huge_pages_test: Add TDP detection for Zhaoxin CPUs Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 4/9] KVM: selftests: vmx_exception_with_invalid_guest_state: Support " Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 5/9] KVM: selftests: fix_hypercall_test: Add Zhaoxin CPU support Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 6/9] KVM: selftests: Skip PERF_CAPABILITIES vCPU checks without PDCM Ewan Hai-oc
2026-09-11 16:19   ` Sean Christopherson
2026-09-10 11:54 ` [PATCH v2 7/9] KVM: selftests: feature_msrs_test: Extend MSR_IA32_UCODE_REV quirk to Zhaoxin Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 8/9] KVM: selftests: nested_exceptions_test: Add Zhaoxin CPU support Ewan Hai-oc
2026-09-10 11:54 ` [PATCH v2 9/9] KVM: selftests: vmx_apic_access_test: Check APIC virtualization support Ewan Hai-oc
2026-09-11 16:32   ` Sean Christopherson

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