File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2974,17 +2974,19 @@ unsigned long perf_misc_flags(struct pt_regs *regs)
2974
2974
2975
2975
void perf_get_x86_pmu_capability (struct x86_pmu_capability * cap )
2976
2976
{
2977
- if (!x86_pmu_initialized ()) {
2977
+ /* This API doesn't currently support enumerating hybrid PMUs. */
2978
+ if (WARN_ON_ONCE (cpu_feature_enabled (X86_FEATURE_HYBRID_CPU )) ||
2979
+ !x86_pmu_initialized ()) {
2978
2980
memset (cap , 0 , sizeof (* cap ));
2979
2981
return ;
2980
2982
}
2981
2983
2982
- cap -> version = x86_pmu .version ;
2983
2984
/*
2984
- * KVM doesn't support the hybrid PMU yet.
2985
- * Return the common value in global x86_pmu,
2986
- * which available for all cores.
2985
+ * Note, hybrid CPU models get tracked as having hybrid PMUs even when
2986
+ * all E-cores are disabled via BIOS. When E-cores are disabled, the
2987
+ * base PMU holds the correct number of counters for P- cores.
2987
2988
*/
2989
+ cap -> version = x86_pmu .version ;
2988
2990
cap -> num_counters_gp = x86_pmu .num_counters ;
2989
2991
cap -> num_counters_fixed = x86_pmu .num_counters_fixed ;
2990
2992
cap -> bit_width_gp = x86_pmu .cntval_bits ;
You can’t perform that action at this time.
0 commit comments