From: Ping Li <leeonion.muyu@gmail.com>
To: will@kernel.org, mark.rutland@arm.com
Cc: robh@kernel.org, leo.yan@arm.com, james.clark@linaro.org,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Ping Li <leeonion.muyu@gmail.com>
Subject: [PATCH v2 0/2] perf: arm_spe: Validate the filter configs per-bit
Date: Mon, 30 Nov 2026 14:13:29 +0800 [thread overview]
Message-ID: <20261130061331.90095-1-leeonion.muyu@gmail.com> (raw)
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
next reply other threads:[~2026-11-30 6:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 6:13 Ping Li [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130061331.90095-1-leeonion.muyu@gmail.com \
--to=leeonion.muyu@gmail.com \
--cc=james.clark@linaro.org \
--cc=leo.yan@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox