From 6b8b11ba47159f33d766b274001529da9d5b0913 Mon Sep 17 00:00:00 2001 From: Zhiquan Li Date: Thu, 12 Feb 2026 18:38:40 +0800 Subject: [PATCH] KVM: selftests: Allow the PMU event filter test for Hygon At present, the PMU event filter test for AMD architecture is applicable for Hygon architecture as well. Since all known Hygon processors can re-use the test cases, so it isn't necessary to create a new wrapper. Signed-off-by: Zhiquan Li Link: https://patch.msgid.link/20260212103841.171459-4-zhiquan_li@163.com Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/x86/pmu_event_filter_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c b/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c index 1c5b7611db24..93b61c077991 100644 --- a/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c +++ b/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c @@ -361,7 +361,8 @@ static bool use_intel_pmu(void) */ static bool use_amd_pmu(void) { - return host_cpu_is_amd && kvm_cpu_family() >= 0x17; + return (host_cpu_is_amd && kvm_cpu_family() >= 0x17) || + host_cpu_is_hygon; } /*