linux/arch/x86/events
Dapeng Mi 86aa94cd50 perf/x86/intel: Fix incorrect MSR index calculations in intel_pmu_config_acr()
The MSR offset calculations in intel_pmu_config_acr() are buggy.

To calculate fixed counter MSR addresses in intel_pmu_config_acr(),
the HW counter index "idx" is subtracted by INTEL_PMC_IDX_FIXED.

This leads to the ACR mask value of fixed counters to be incorrectly
saved to the positions of GP counters in acr_cfg_b[], e.g.

For fixed counter 0, its ACR counter mask should be saved to
acr_cfg_b[32], but it's saved to acr_cfg_b[0] incorrectly.

Fix this issue.

[ mingo: Clarified & improved the changelog. ]

Fixes: ec980e4fac ("perf/x86/intel: Support auto counter reload")
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250529080236.2552247-2-dapeng1.mi@linux.intel.com
2025-05-31 10:05:16 +02:00
..
amd Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
intel perf/x86/intel: Fix incorrect MSR index calculations in intel_pmu_config_acr() 2025-05-31 10:05:16 +02:00
zhaoxin Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
core.c Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
Kconfig perf/x86/Kconfig: Fix indentation in the Kconfig file 2022-05-25 15:54:26 +02:00
Makefile perf/x86: Move branch classifier 2022-08-27 00:05:44 +02:00
msr.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00
perf_event.h Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
perf_event_flags.h perf: Extend the bit width of the arch-specific flag 2025-04-08 20:55:49 +02:00
probe.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00
probe.h
rapl.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00
utils.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00