Re: [PATCH RESEND 4/5] KVM: x86: selftests: Allow the PMU event filter test for Hygon

From: Zhiquan Li

Date: Tue Feb 10 2026 - 04:10:56 EST



On 2/10/26 00:38, Sean Christopherson wrote:
> Manually handling every check is rather silly, just do:
>
> 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;
> }
>
> /*

No problem, let me simplify it in V2 patch. Thanks!

Best Regards,
Zhiquan