Re: [PATCH 03/20] perf/x86/intel: Parse CPUID archPerfmonExt leaves for non-hybrid CPUs
From: Andi Kleen
Date: Thu Jan 23 2025 - 13:58:33 EST
> + /*
> + * The archPerfmonExt (0x23) includes an enhanced enumeration of
> + * PMU architectural features with a per-core view. For non-hybrid,
> + * each core has the same PMU capabilities. It's good enough to
> + * update the x86_pmu from the booting CPU. For hybrid, the x86_pmu
> + * is used to keep the common capabilities. Still keep the values
> + * from the leaf 0xa. The core specific update will be done later
> + * when a new type is online.
> + */
> + if (!is_hybrid() && boot_cpu_has(X86_FEATURE_ARCH_PERFMON_EXT))
> + update_pmu_cap(NULL);
It seems ugly to have these different code paths. Couldn't non hybrid
use x86_pmu in the same way? I assume it would be a larger patch.
-Andi