mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] perf: arm_spe: Validate the filter configs per-bit
@ 2026-11-30  6:13 Ping Li
  2026-11-30  6:13 ` [PATCH v2 1/2] perf: arm_spe: Validate the inverse event filter against PMSNEVFR_EL1 Ping Li
  2026-11-30  6:13 ` [PATCH v2 2/2] perf: arm_spe: Validate the data source filter per-bit Ping Li
  0 siblings, 2 replies; 7+ messages in thread
From: Ping Li @ 2026-11-30  6:13 UTC (permalink / raw)
  To: will, mark.rutland
  Cc: robh, leo.yan, james.clark, linux-arm-kernel, linux-perf-users,
	linux-kernel, Ping Li

Probe the supported filter bits of PMSNEVFR_EL1 and PMSDSFR_EL1
separately instead of reusing the mask probed from PMSEVFR_EL1, and
validate the inverse event filter and the data source filter against
their own masks.

Runtime-tested on Cortex-A78AE (SPEv1.0, which implements neither
FnE nor FDS) and on Cortex-A720AE (SPEv1.2, which implements FnE
but not FDS): the PMU probes cleanly with the per-register
discovery in place, event filter configs are validated per-bit
against the probed masks with unimplemented bits rejected using
-EOPNOTSUPP, and sampling is unaffected. Only the FDS path lacks
coverage on hardware implementing the feature.

Changes in v2:
- Split into two patches so each fix can be backported
  independently (Leo Yan).
- Reword the PMSNEVFR_EL1 motivation: implementations are expected
  to use the same bit positions, the practical benefit of the early
  mask check is reporting the error at the first opportunity when
  FEAT_INV_FILT_EVT is absent (Leo Yan).
- Group the data source filter check with the FDS presence check so
  that config4 is only validated when the filter is in use (Leo
  Yan).
- Drop the Tested-by tag (Leo Yan).

Ping Li (2):
  perf: arm_spe: Validate the inverse event filter against PMSNEVFR_EL1
  perf: arm_spe: Validate the data source filter per-bit

 drivers/perf/arm_spe_pmu.c | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <"20261130104035.GJ861809@e132581.arm.com">]

end of thread, other threads:[~2026-11-30 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30  6:13 [PATCH v2 0/2] perf: arm_spe: Validate the filter configs per-bit Ping Li
2026-11-30  6:13 ` [PATCH v2 1/2] perf: arm_spe: Validate the inverse event filter against PMSNEVFR_EL1 Ping Li
2026-11-30 10:42   ` James Clark
2026-11-30 10:56     ` Leo Yan
2026-11-30  6:13 ` [PATCH v2 2/2] perf: arm_spe: Validate the data source filter per-bit Ping Li
2026-11-30 10:40   ` Leo Yan
     [not found] <"20261130104035.GJ861809@e132581.arm.com">
2026-11-30 13:17 ` Ping Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®