From: Leo Yan <leo.yan@arm.com>
To: Ping Li <leeonion.muyu@gmail.com>
Cc: will@kernel.org, mark.rutland@arm.com, robh@kernel.org,
james.clark@linaro.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] perf: arm_spe: Validate the data source filter per-bit
Date: Mon, 30 Nov 2026 14:50:06 +0000 [thread overview]
Message-ID: <20261130145006.GL861809@e132581.arm.com> (raw)
In-Reply-To: <20261130131748.1487948-1-leeonion.muyu@gmail.com>
On Mon, Nov 30, 2026 at 09:17:48PM +0800, Ping Li wrote:
[...]
> Example: inv_data_src_filter=0x8 (exclude source 3, keep the rest)
>
> config4 = 0x0000000000000008
> written to PMSDSFR_EL1 = ~config4 = 0xfffffffffffffff7
>
> reg & pmsdsfr_res0 = 0xfffffffffffffff7 & 0xffffffffffffff00
> = 0xffffffffffffff00 != 0
> -> current check rejects: perf_event_open() fails with
> -EOPNOTSUPP
>
> ~reg & pmsdsfr_res0 = 0x0000000000000008 & 0xffffffffffffff00
> = 0x0000000000000000 == 0
> -> proposed check passes: the session runs, source 3 is
> excluded as requested, but sources 8-63 are silently
> missing although the config asked to include them
>
> The crux is the bits the user never explicitly set: with the
> inverted ABI, a cleared bit asks for the source to be included, so
> inv_data_src_filter=0x8 also asks for sources 8-63 to be included,
> and their bits are not implemented.
I have different understanding for "inv_data_src_filter=0x8 also asks
for sources 8-63 to be included".
With 0x8, userspace asks only to exclude data source 3. A clear bit
leaves the corresponding source eligible where supported, so I'd
validate only the set bits in config4.
Thanks,
Leo
next prev parent reply other threads:[~2026-11-30 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <"20261130104035.GJ861809@e132581.arm.com">
2026-11-30 13:17 ` [PATCH v2 2/2] perf: arm_spe: Validate the data source filter per-bit Ping Li
2026-11-30 14:50 ` Leo Yan [this message]
[not found] <"3dffa952-9430-4947-b2b9-9a826f1cc938@linaro.org">
2026-12-01 3:31 ` Ping Li
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 2/2] perf: arm_spe: Validate the data source filter per-bit Ping Li
2026-11-30 6:24 ` sashiko-bot
2026-11-30 10:40 ` Leo Yan
2026-11-30 14:51 ` James Clark
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=20261130145006.GL861809@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=james.clark@linaro.org \
--cc=leeonion.muyu@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.