perf/x86/intel: Support Architectural PerfMon Extension leaf
authorKan Liang <kan.liang@linux.intel.com>
Wed, 4 Jan 2023 20:13:45 +0000 (12:13 -0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 9 Jan 2023 11:22:08 +0000 (12:22 +0100)
commiteb467aaac21e133a3d01c48c0a6bf43756b06e78
tree607cf74d86120fda94328468aa427a7234393460
parenta018d2e3d4b1abc4a3cb64415c5d204fc5d2eafd
perf/x86/intel: Support Architectural PerfMon Extension leaf

The new CPUID leaf 0x23 reports the "true view" of PMU resources.

The sub-leaf 1 reports the available general-purpose counters and fixed
counters. Update the number of counters and fixed counters when the
sub-leaf is detected.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230104201349.1451191-5-kan.liang@linux.intel.com
arch/x86/events/intel/core.c
arch/x86/include/asm/perf_event.h