]> git.ipfire.org Git - thirdparty/linux.git/commit
perf test ibs: Skip privilege test on Zen6 and newer platforms
authorRavi Bangoria <ravi.bangoria@amd.com>
Fri, 8 May 2026 05:59:59 +0000 (05:59 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 23 May 2026 00:31:16 +0000 (21:31 -0300)
commit540dc628ab5dc2cf176053c9794ed9891269484b
tree308653ddceb62d9e82f2eb8f69368deacd3cd820
parent45bd2d77fbedec862204bb5c0fcaba2b7fa5fb56
perf test ibs: Skip privilege test on Zen6 and newer platforms

IBS on pre-Zen6 platforms lacked a hardware privilege filter, so the
kernel enabled swfilt=1. Zen6 and newer platforms provides privilege
filtering via the RIP[63] bit, making swfilt redundant. Skip the perf
unit test that assumes IBS has no hardware-assisted privilege filter
on Zen6 and newer platforms.

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 on Zen6:

  # sudo ./perf test -vv 77
   77: AMD IBS software filtering:
  --- start ---
  test child forked, pid 30813
  check availability of IBS swfilt
  run perf record with modifier and swfilt
  [FAIL] IBS PMU should not accept exclude_kernel
  ---- end(-1) ----
   77: AMD IBS software filtering                            : FAILED!

With the patch:

  # ./perf test -vv 77
   77: AMD IBS software filtering:
  --- start ---
  test child forked, pid 30903
  check availability of IBS swfilt
  run perf record with modifier and swfilt
  [ perf record: Woken up 2 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 4 times to write data ]
  [ perf record: Captured and wrote 0.051 MB - ]
  [ perf record: Woken up 4 times to write data ]
  [ perf record: Captured and wrote 0.063 MB - ]
  ---- end(0) ----
   77: AMD IBS software filtering                            : Ok

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ananth Narayan <ananth.narayan@amd.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Manali Shukla <manali.shukla@amd.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandipan Das <sandipan.das@amd.com>
Cc: Santosh Shukla <santosh.shukla@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/amd-ibs-swfilt.sh