[PATCH v3 0/8] perf tools amd ibs: Fixes + Zen6 enhancements

Ravi Bangoria posted 8 patches 3 weeks, 1 day ago
tools/arch/x86/include/asm/amd/ibs.h       |  4 +-
tools/perf/Documentation/perf-amd-ibs.txt  | 39 ++++++++++
tools/perf/arch/x86/tests/amd-ibs-period.c |  2 +-
tools/perf/tests/shell/amd-ibs-swfilt.sh   | 37 ++++++++-
tools/perf/util/amd-sample-raw.c           | 87 ++++++++++++++++++++--
5 files changed, 156 insertions(+), 13 deletions(-)
[PATCH v3 0/8] perf tools amd ibs: Fixes + Zen6 enhancements
Posted by Ravi Bangoria 3 weeks, 1 day ago
o Fix kernel version check in perf IBS unit test.
o On Zen6 and newer platforms, skip perf unit test that assumes IBS don't
  have hardware-assisted privilege filter.
o Starting with Zen4, the validity of several IBS fields changes. Add
  the required dependency checks when decoding IBS MSRs.
o Zen6 and future platforms extends IBS OP with Streaming-Store and
  Remote-Socket indicators for load/store instructions. Add decoding
  support for these new bits.
o Document new IBS features in perf-amd-ibs man page 

IBS Zen6 enhancements doc:
  AMD64 Zen6 Instruction Based Sampling (IBS) Extensions and Features,
  Pub. 69205 Rev. 1.00 March 2026 
  https://bugzilla.kernel.org/attachment.cgi?id=310002

Patches are prepared on perf-tools-next/perf-tools-next (53bc03289278).

v2: https://lore.kernel.org/r/20260430061115.10266-1-ravi.bangoria@amd.com  
v2->v3:
 - Instead of removing the priv modifier unit test completely, skip
   it on platforms that supports hardware privilege filtering. (Namhyung)
 - Rebased the series on latest perf-tools-next/perf-tools-next.

Ravi Bangoria (8):
  perf test amd ibs: Fix incorrect kernel version check
  perf tool ibs: Sync AMD IBS header file
  perf test ibs: Skip privilege test on Zen6 and newer platforms
  perf amd ibs: Suppress bogus TlbRefillLat and DCPhysAd on Zen4+
  perf amd ibs: Make Fetch status bits dependent on PhyAddrValid for
    newer platforms
  perf amd ibs: Decode Remote-Socket flag in IBS OP raw dump
  perf amd ibs: Decode Streaming-store flag in IBS OP raw dump
  perf doc: Document new IBS capabilities in man page

 tools/arch/x86/include/asm/amd/ibs.h       |  4 +-
 tools/perf/Documentation/perf-amd-ibs.txt  | 39 ++++++++++
 tools/perf/arch/x86/tests/amd-ibs-period.c |  2 +-
 tools/perf/tests/shell/amd-ibs-swfilt.sh   | 37 ++++++++-
 tools/perf/util/amd-sample-raw.c           | 87 ++++++++++++++++++++--
 5 files changed, 156 insertions(+), 13 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/8] perf tools amd ibs: Fixes + Zen6 enhancements
Posted by Namhyung Kim 2 weeks, 6 days ago
Hello,

On Fri, May 08, 2026 at 05:59:56AM +0000, Ravi Bangoria wrote:
> o Fix kernel version check in perf IBS unit test.
> o On Zen6 and newer platforms, skip perf unit test that assumes IBS don't
>   have hardware-assisted privilege filter.
> o Starting with Zen4, the validity of several IBS fields changes. Add
>   the required dependency checks when decoding IBS MSRs.
> o Zen6 and future platforms extends IBS OP with Streaming-Store and
>   Remote-Socket indicators for load/store instructions. Add decoding
>   support for these new bits.
> o Document new IBS features in perf-amd-ibs man page 
> 
> IBS Zen6 enhancements doc:
>   AMD64 Zen6 Instruction Based Sampling (IBS) Extensions and Features,
>   Pub. 69205 Rev. 1.00 March 2026 
>   https://bugzilla.kernel.org/attachment.cgi?id=310002
> 
> Patches are prepared on perf-tools-next/perf-tools-next (53bc03289278).
> 
> v2: https://lore.kernel.org/r/20260430061115.10266-1-ravi.bangoria@amd.com  
> v2->v3:
>  - Instead of removing the priv modifier unit test completely, skip
>    it on platforms that supports hardware privilege filtering. (Namhyung)
>  - Rebased the series on latest perf-tools-next/perf-tools-next.
> 
> Ravi Bangoria (8):
>   perf test amd ibs: Fix incorrect kernel version check
>   perf tool ibs: Sync AMD IBS header file
>   perf test ibs: Skip privilege test on Zen6 and newer platforms
>   perf amd ibs: Suppress bogus TlbRefillLat and DCPhysAd on Zen4+
>   perf amd ibs: Make Fetch status bits dependent on PhyAddrValid for
>     newer platforms
>   perf amd ibs: Decode Remote-Socket flag in IBS OP raw dump
>   perf amd ibs: Decode Streaming-store flag in IBS OP raw dump
>   perf doc: Document new IBS capabilities in man page

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

> 
>  tools/arch/x86/include/asm/amd/ibs.h       |  4 +-
>  tools/perf/Documentation/perf-amd-ibs.txt  | 39 ++++++++++
>  tools/perf/arch/x86/tests/amd-ibs-period.c |  2 +-
>  tools/perf/tests/shell/amd-ibs-swfilt.sh   | 37 ++++++++-
>  tools/perf/util/amd-sample-raw.c           | 87 ++++++++++++++++++++--
>  5 files changed, 156 insertions(+), 13 deletions(-)
> 
> -- 
> 2.43.0
>
Re: [PATCH v3 0/8] perf tools amd ibs: Fixes + Zen6 enhancements
Posted by Ravi Bangoria 1 week, 2 days ago
>> o Fix kernel version check in perf IBS unit test.
>> o On Zen6 and newer platforms, skip perf unit test that assumes IBS don't
>>   have hardware-assisted privilege filter.
>> o Starting with Zen4, the validity of several IBS fields changes. Add
>>   the required dependency checks when decoding IBS MSRs.
>> o Zen6 and future platforms extends IBS OP with Streaming-Store and
>>   Remote-Socket indicators for load/store instructions. Add decoding
>>   support for these new bits.
>> o Document new IBS features in perf-amd-ibs man page 
>>
>> IBS Zen6 enhancements doc:
>>   AMD64 Zen6 Instruction Based Sampling (IBS) Extensions and Features,
>>   Pub. 69205 Rev. 1.00 March 2026 
>>   https://bugzilla.kernel.org/attachment.cgi?id=310002
>>
>> Patches are prepared on perf-tools-next/perf-tools-next (53bc03289278).
>>
>> v2: https://lore.kernel.org/r/20260430061115.10266-1-ravi.bangoria@amd.com  
>> v2->v3:
>>  - Instead of removing the priv modifier unit test completely, skip
>>    it on platforms that supports hardware privilege filtering. (Namhyung)
>>  - Rebased the series on latest perf-tools-next/perf-tools-next.
>>
>> Ravi Bangoria (8):
>>   perf test amd ibs: Fix incorrect kernel version check
>>   perf tool ibs: Sync AMD IBS header file
>>   perf test ibs: Skip privilege test on Zen6 and newer platforms
>>   perf amd ibs: Suppress bogus TlbRefillLat and DCPhysAd on Zen4+
>>   perf amd ibs: Make Fetch status bits dependent on PhyAddrValid for
>>     newer platforms
>>   perf amd ibs: Decode Remote-Socket flag in IBS OP raw dump
>>   perf amd ibs: Decode Streaming-store flag in IBS OP raw dump
>>   perf doc: Document new IBS capabilities in man page
> 
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks Namhyung.

Arnaldo, mind picking this up?

Thanks,
Ravi
Re: [PATCH v3 0/8] perf tools amd ibs: Fixes + Zen6 enhancements
Posted by Arnaldo Carvalho de Melo 1 week ago
On Thu, May 21, 2026 at 08:22:23AM +0530, Ravi Bangoria wrote:
> >> o Fix kernel version check in perf IBS unit test.
> >> o On Zen6 and newer platforms, skip perf unit test that assumes IBS don't
> >>   have hardware-assisted privilege filter.
> >> o Starting with Zen4, the validity of several IBS fields changes. Add
> >>   the required dependency checks when decoding IBS MSRs.
> >> o Zen6 and future platforms extends IBS OP with Streaming-Store and
> >>   Remote-Socket indicators for load/store instructions. Add decoding
> >>   support for these new bits.
> >> o Document new IBS features in perf-amd-ibs man page 
> >>
> >> IBS Zen6 enhancements doc:
> >>   AMD64 Zen6 Instruction Based Sampling (IBS) Extensions and Features,
> >>   Pub. 69205 Rev. 1.00 March 2026 
> >>   https://bugzilla.kernel.org/attachment.cgi?id=310002
> >>
> >> Patches are prepared on perf-tools-next/perf-tools-next (53bc03289278).
> >>
> >> v2: https://lore.kernel.org/r/20260430061115.10266-1-ravi.bangoria@amd.com  
> >> v2->v3:
> >>  - Instead of removing the priv modifier unit test completely, skip
> >>    it on platforms that supports hardware privilege filtering. (Namhyung)
> >>  - Rebased the series on latest perf-tools-next/perf-tools-next.
> >>
> >> Ravi Bangoria (8):
> >>   perf test amd ibs: Fix incorrect kernel version check
> >>   perf tool ibs: Sync AMD IBS header file
> >>   perf test ibs: Skip privilege test on Zen6 and newer platforms
> >>   perf amd ibs: Suppress bogus TlbRefillLat and DCPhysAd on Zen4+
> >>   perf amd ibs: Make Fetch status bits dependent on PhyAddrValid for
> >>     newer platforms
> >>   perf amd ibs: Decode Remote-Socket flag in IBS OP raw dump
> >>   perf amd ibs: Decode Streaming-store flag in IBS OP raw dump
> >>   perf doc: Document new IBS capabilities in man page
> > 
> > Acked-by: Namhyung Kim <namhyung@kernel.org>
> 
> Thanks Namhyung.
> 
> Arnaldo, mind picking this up?

Sure, thanks, applied to perf-tools-next, for v7.2.

- Arnaldo