From: Namhyung Kim <namhyung@kernel.org>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Dapeng Mi <dapeng1.mi@linux.intel.com>,
James Clark <james.clark@linaro.org>,
x86@kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org,
Manali Shukla <manali.shukla@amd.com>,
Santosh Shukla <santosh.shukla@amd.com>,
Ananth Narayan <ananth.narayan@amd.com>,
Sandipan Das <sandipan.das@amd.com>
Subject: Re: [PATCH v2 3/8] perf test ibs: Remove obsolete privilege test
Date: Thu, 7 May 2026 17:24:47 -0700 [thread overview]
Message-ID: <af0tTxZNLdtohH8A@google.com> (raw)
In-Reply-To: <20260430061115.10266-4-ravi.bangoria@amd.com>
Hello,
On Thu, Apr 30, 2026 at 06:11:10AM +0000, Ravi Bangoria wrote:
> Older IBS implementations lacked a hardware privilege filter, so the
> kernel enabled swfilt=1. Newer AMD CPUs will provide privilege filtering
> via the RIP[63] bit, making swfilt redundant. Remove the perf unit test
> that assumes IBS has no hardware-assisted privilege filter.
Can you add a check for CPU model or capability for this?
Probably we want to keep this test for older models..
Thanks,
Namhyung
>
> swfilt is ignored by kernel on platforms that support RIP[63] bit filter
> i.e. all amd-ibs-swfilt.sh tests will test hardware assisted privilege
> filter.
>
> Without the patch:
>
> # ./perf test -vv 75
> test child forked, pid 26029
> check availability of IBS swfilt
> run perf record with modifier and swfilt
> [FAIL] IBS PMU should not accept exclude_kernel
> 75: AMD IBS software filtering : FAILED!
>
> With the patch:
>
> # ./perf test -vv 75
> check availability of IBS swfilt
> run perf record with modifier and swfilt
> [ perf record: Woken up 3 times to write data ]
> [ perf record: Captured and wrote 0.000 MB /dev/null ]
> [ perf record: Woken up 3 times to write data ]
> [ perf record: Captured and wrote 0.000 MB /dev/null ]
> [ perf record: Woken up 3 times to write data ]
> [ perf record: Captured and wrote 0.000 MB /dev/null ]
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.000 MB /dev/null ]
> check number of samples with swfilt
> [ perf record: Woken up 5 times to write data ]
> [ perf record: Captured and wrote 0.040 MB - ]
> [ perf record: Woken up 3 times to write data ]
> [ perf record: Captured and wrote 0.054 MB - ]
> 75: AMD IBS software filtering : Ok
>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
> ---
> tools/perf/tests/shell/amd-ibs-swfilt.sh | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/tools/perf/tests/shell/amd-ibs-swfilt.sh b/tools/perf/tests/shell/amd-ibs-swfilt.sh
> index e7f66df05c4b..92ef45bf3043 100755
> --- a/tools/perf/tests/shell/amd-ibs-swfilt.sh
> +++ b/tools/perf/tests/shell/amd-ibs-swfilt.sh
> @@ -22,13 +22,6 @@ fi
> echo "run perf record with modifier and swfilt"
> err=0
>
> -# setting any modifiers should fail
> -perf record -B -e ibs_op//u -o /dev/null true 2> /dev/null
> -if [ $? -eq 0 ]; then
> - echo "[FAIL] IBS PMU should not accept exclude_kernel"
> - exit 1
> -fi
> -
> # setting it with swfilt should be fine
> perf record -B -e ibs_op/swfilt/u -o /dev/null true
> if [ $? -ne 0 ]; then
> --
> 2.43.0
>
next parent reply other threads:[~2026-05-08 0:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260430061115.10266-1-ravi.bangoria@amd.com>
[not found] ` <20260430061115.10266-4-ravi.bangoria@amd.com>
2026-05-08 0:24 ` Namhyung Kim [this message]
2026-05-08 6:05 ` [PATCH v2 3/8] perf test ibs: Remove obsolete privilege test Ravi Bangoria
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=af0tTxZNLdtohH8A@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=ananth.narayan@amd.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=manali.shukla@amd.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
--cc=x86@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