Re: [PATCH v3 4/8] perf amd ibs: Suppress bogus TlbRefillLat and DCPhysAd on Zen4+
Ravi Bangoria <[email protected]> Tue, 12 May 2026 14:19:04 +0530
| Newsgroups | dev.linux.lists.sashiko,org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
>> @@ -253,8 +260,12 @@ static void amd_dump_ibs_op(struct perf_sample *sample)
>> pr_ibs_op_data3(*op_data3);
>> if (op_data3->dc_lin_addr_valid)
>> printf("IbsDCLinAd:\t%016llx\n", *(rip + 4));
>> - if (op_data3->dc_phy_addr_valid)
>> +
>> + /* Use !zen4_ibs_extensions as a proxy for Zen3 and earlier */
>> + if (op_data3->dc_phy_addr_valid && *(rip + 5) &&
>> + (!zen4_ibs_extensions || op_data3->dc_lin_addr_valid)) {
>> printf("IbsDCPhysAd:\t%016llx\n", *(rip + 5));
>> + }
>
> Does checking *(rip + 5) here suppress valid memory accesses to physical
> address 0x0?
>
> While this successfully hides kernel-zeroed addresses for unprivileged users,
> it seems like it cannot distinguish between software-zeroed values and actual
> 0x0 addresses. Could this silently discard valid diagnostic data during
> privileged profiling sessions if an actual hardware access to physical page 0
> occurs?
This doesn't seem like a genuine concern. The first physical page is reserved
on x86 systems, so normal workload should never access it.
$ head -1 /proc/iomem
00000000-00000fff : Reserved
Thanks,
Ravi