aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net_utils.c
diff options
context:
space:
mode:
authorKan Liang <[email protected]>2025-01-29 15:48:19 +0000
committerPeter Zijlstra <[email protected]>2025-02-08 14:47:25 +0000
commit47a973fd75639fe80d59f9e1860113bb2a0b112b (patch)
treeb19bd0363572535dabbd5e1a65088b42fd6fd624 /lib/net_utils.c
parentperf/x86/intel: Clean up PEBS-via-PT on hybrid (diff)
downloadkernel-47a973fd75639fe80d59f9e1860113bb2a0b112b.tar.gz
kernel-47a973fd75639fe80d59f9e1860113bb2a0b112b.zip
perf/x86/intel: Fix ARCH_PERFMON_NUM_COUNTER_LEAF
The EAX of the CPUID Leaf 023H enumerates the mask of valid sub-leaves. To tell the availability of the sub-leaf 1 (enumerate the counter mask), perf should check the bit 1 (0x2) of EAS, rather than bit 0 (0x1). The error is not user-visible on bare metal. Because the sub-leaf 0 and the sub-leaf 1 are always available. However, it may bring issues in a virtualization environment when a VMM only enumerates the sub-leaf 0. Introduce the cpuid35_e?x to replace the macros, which makes the implementation style consistent. Fixes: eb467aaac21e ("perf/x86/intel: Support Architectural PerfMon Extension leaf") Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions