Message ID | 20241217212317.3709478-1-oliver.upton@linux.dev (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | KVM: arm64: Support FEAT_PMUv3 on Apple hardware | expand |
diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c index b4fe247543a6..0e54d3f900a7 100644 --- a/drivers/perf/apple_m1_cpu_pmu.c +++ b/drivers/perf/apple_m1_cpu_pmu.c @@ -180,7 +180,10 @@ static const unsigned m1_pmu_perf_map[PERF_COUNT_HW_MAX] = { static const unsigned int m1_pmu_pmceid_map[ARMV8_PMUV3_MAX_COMMON_EVENTS] = { [0 ... ARMV8_PMUV3_MAX_COMMON_EVENTS - 1] = HW_OP_UNSUPPORTED, + M1_PMUV3_EVENT_MAP(INST_RETIRED, INST_ALL), M1_PMUV3_EVENT_MAP(CPU_CYCLES, CORE_ACTIVE_CYCLE), + M1_PMUV3_EVENT_MAP(BR_RETIRED, INST_BRANCH), + M1_PMUV3_EVENT_MAP(BR_MIS_PRED_RETIRED, BRANCH_MISPRED_NONSPEC), }; /* sysfs definitions */
Map some more PMUv3 events onto hardware so 'perf stat' in a KVM VM can show some useful information (e.g. IPC, branch prediction rate). Signed-off-by: Oliver Upton <oliver.upton@linux.dev> --- drivers/perf/apple_m1_cpu_pmu.c | 3 +++ 1 file changed, 3 insertions(+)