]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: selftests: Allow the PMU event filter test for Hygon
authorZhiquan Li <zhiquan_li@163.com>
Thu, 12 Feb 2026 10:38:40 +0000 (18:38 +0800)
committerSean Christopherson <seanjc@google.com>
Mon, 2 Mar 2026 21:18:00 +0000 (13:18 -0800)
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 <zhiquan_li@163.com>
Link: https://patch.msgid.link/20260212103841.171459-4-zhiquan_li@163.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86/pmu_event_filter_test.c

index 1c5b7611db2418b4a8255ff11b52bf35e290a454..93b61c0779911242b8cde1247c045c62e0959756 100644 (file)
@@ -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;
 }
 
 /*