Re: [PATCH v2 0/4] KVM: x86: selftests: Add Hygon CPUs support and fix failures
From: Zhiquan Li
Date: Tue Feb 24 2026 - 05:16:06 EST
On 2/12/26 18:38, Zhiquan Li wrote:
> This series to add support for Hygon CPUs and fix 11 KVM selftest failures
> on Hygon architecture.
>
> Patch 1 add CPU vendor detection for Hygon and add a global variable
> "host_cpu_is_hygon" to identify if the test is running on a Hygon CPU.
> It is the prerequisite for the following fixes.
>
> Patch 2 add a flag to identify AMD compatible CPU and figure out the
> compatible cases, so that Hygon CPUs can re-use them.
> Following test failures on Hygon platform can be fixed by this patch:
> - access_tracking_perf_test
> - demand_paging_test
> - dirty_log_perf_test
> - dirty_log_test
> - kvm_page_table_test
> - memslot_modification_stress_test
> - pre_fault_memory_test
> - x86/dirty_log_page_splitting_test
> - x86/fix_hypercall_test
>
> Patch 3 fix x86/pmu_event_filter_test failure by allowing the tests for
> Hygon CPUs.
>
> Patch 4 fix x86/msrs_test failure while writing the MSR_TSC_AUX reserved
> bits without RDPID support.
> Sean has made a perfect solution for the issue and provided the patch.
> It has been verified on Intel, AMD and Hygon platforms, no regression.
>
Kindly ping for any review on these.
Best Regards,
Zhiquan
> ---
>
> V1: https://lore.kernel.org/kvm/20260209041305.64906-1-zhiquan_li@xxxxxxx/T/#t
>
> Changes since V1:
> - Rebased to kvm-x86/next.
> - Followed Sean's suggestion, added a flag to identify AMD compatible test
> cases, then v1/patch 2 and v1/patch 3 can be combined to v2/patch 2.
> - Followed Sean's suggestion, simplified patch 4, that is v2/patch 3 now.
> - Sean provided the v2/patch 4 for the issue reported by v1/patch5, I
> replaced my SoB with "Reported-by" tag.
>
> ---
>
> Sean Christopherson (1):
> KVM: selftests: Fix reserved value WRMSR testcase for multi-feature
> MSRs
>
> Zhiquan Li (3):
> KVM: x86: selftests: Add CPU vendor detection for Hygon
> KVM: x86: selftests: Add a flag to identify AMD compatible test cases
> KVM: x86: selftests: Allow the PMU event filter test for Hygon
>
> .../testing/selftests/kvm/include/x86/processor.h | 7 +++++++
> tools/testing/selftests/kvm/lib/x86/processor.c | 15 +++++++++++----
> .../selftests/kvm/x86/fix_hypercall_test.c | 2 +-
> tools/testing/selftests/kvm/x86/msrs_test.c | 4 ++--
> .../selftests/kvm/x86/pmu_event_filter_test.c | 3 ++-
> .../testing/selftests/kvm/x86/xapic_state_test.c | 2 +-
> 6 files changed, 24 insertions(+), 9 deletions(-)
>
>
> base-commit: e944fe2c09f405a2e2d147145c9b470084bc4c9a