[PATCH 0/2] perf jevents: Add IOMMU PTW & device entry metrics

From: Jacob Lefkowitz via B4 Relay

Date: Thu Oct 29 2026 - 15:09:16 EST


Adds AMD specific metrics for the IOMMU with respect to page table
walks and device table entires. The metrics cover ratios, rates, and
percentages with respect to any event which might be triggered during
a page table walk or device table entry lookup.

The metrics target Zen 2+ processors and use the standard amd_iommu
PMU events. They have been tested with a benchmark C program that
purposefully thrashed the TLB as well as with 'sleep 10'; both of
which work as expected.

The changes are split into two patches:
1. perf jevents: add iommu page table walk metrics
2. perf jevents: add amd specific device table entry metrics

The specific metris added are:
- lpm_iommu_dte_miss_rate
- lpm_iommu_dte_lookups
- lpm_iommu_ptw_reads_per_tlb_miss
- lpm_iommu_ptw_nested_read_ratio
- lpm_iommu_ptw_guest_read_ratio
- lpm_iommu_trans_per_sec

Signed-off-by: Jacob Lefkowitz <jlefkowi@xxxxxxxxxx>
---
Jacob Lefkowitz (2):
perf jevents: add iommu page table walk metrics
perf jevents: add amd specific device table entry metrics

tools/perf/pmu-events/amd_metrics.py | 81 +++++++++++++++++++++++++++++++++++-
1 file changed, 80 insertions(+), 1 deletion(-)
---
base-commit: 1c90f0a3c8a1c4e38f9edd97af9e20848805a7fb
change-id: 20261028-perf-tools-next-8fd1d433316a

Best regards,
--
Jacob Lefkowitz <jlefkowi@xxxxxxxxxx>