.../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(-)
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.
---
V1: https://lore.kernel.org/kvm/20260209041305.64906-1-zhiquan_li@163.com/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
--
2.43.0
On Thu, 12 Feb 2026 18:38:37 +0800, 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.
>
> [...]
Applied to kvm-x86 selftests, thanks!
[1/4] KVM: x86: selftests: Add CPU vendor detection for Hygon
https://github.com/kvm-x86/linux/commit/0c96c47d4345
[2/4] KVM: x86: selftests: Add a flag to identify AMD compatible test cases
https://github.com/kvm-x86/linux/commit/53b2869231d3
[3/4] KVM: x86: selftests: Allow the PMU event filter test for Hygon
https://github.com/kvm-x86/linux/commit/6b8b11ba4715
[4/4] KVM: selftests: Fix reserved value WRMSR testcase for multi-feature MSRs
https://github.com/kvm-x86/linux/commit/9396cc1e282a
--
https://github.com/kvm-x86/linux/tree/next
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@163.com/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
On Tue, Feb 24, 2026, Zhiquan Li wrote: > > 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. They're in my queue, but I typically don't apply anything except urgent fixes until after -rc2.
© 2016 - 2026 Red Hat, Inc.