]> git.ipfire.org Git - thirdparty/linux.git/commit
perf/x86/intel: Support PERFEVTSEL extension
authorKan Liang <kan.liang@linux.intel.com>
Wed, 26 Jun 2024 14:35:39 +0000 (07:35 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 4 Jul 2024 14:00:40 +0000 (16:00 +0200)
commitdce0c74d2d180ce21d074b4f977821a567ab0020
tree9eea40b74f2327fb9caa4c44ac74a5c6d5ad5222
parente8fb5d6e765838e913253ef7c9b6fd8ec76c8d53
perf/x86/intel: Support PERFEVTSEL extension

Two new fields (the unit mask2, and the equal flag) are added in the
IA32_PERFEVTSELx MSRs. They can be enumerated by the CPUID.23H.0.EBX.

Update the config_mask in x86_pmu and x86_hybrid_pmu for the true layout
of the PERFEVTSEL.
Expose the new formats into sysfs if they are available. The umask
extension reuses the same format attr name "umask" as the previous
umask. Add umask2_show to determine/display the correct format
for the current machine.

Co-developed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lkml.kernel.org/r/20240626143545.480761-8-kan.liang@linux.intel.com
arch/x86/events/intel/core.c
arch/x86/include/asm/perf_event.h