summaryrefslogtreecommitdiff
path: root/include/linux/perf
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2025-03-05 12:26:38 -0800
committerOliver Upton <oliver.upton@linux.dev>2025-03-11 12:54:29 -0700
commit1e7dcbfa4b7cddfbe1cde6067d135f5452692256 (patch)
tree4043a2c41c7037f10a11899deb4e891db259765f /include/linux/perf
parentbed9b8ec8c71135c59004d12658d8affe232f27e (diff)
KVM: arm64: Remap PMUv3 events onto hardware
Map PMUv3 event IDs onto hardware, if the driver exposes such a helper. This is expected to be quite rare, and only useful for non-PMUv3 hardware. Tested-by: Janne Grunau <j@jannau.net> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250305202641.428114-12-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'include/linux/perf')
-rw-r--r--include/linux/perf/arm_pmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h
index 4b5b83677e3f..7ce6dea5bfa9 100644
--- a/include/linux/perf/arm_pmu.h
+++ b/include/linux/perf/arm_pmu.h
@@ -100,6 +100,10 @@ struct arm_pmu {
void (*stop)(struct arm_pmu *);
void (*reset)(void *);
int (*map_event)(struct perf_event *event);
+ /*
+ * Called by KVM to map the PMUv3 event space onto non-PMUv3 hardware.
+ */
+ int (*map_pmuv3_event)(unsigned int eventsel);
DECLARE_BITMAP(cntr_mask, ARMPMU_MAX_HWEVENTS);
bool secure_access; /* 32-bit ARM only */
#define ARMV8_PMUV3_MAX_COMMON_EVENTS 0x40