Re: [PATCH] arm_mpam: Only program MATCH_PMG when the monitor supports it

From: Ben Horgan

Date: Tue Nov 03 2026 - 07:11:22 EST


Hi Ping,

On 03/11/2026 02:37, Ping Li wrote:
> Hi Ben,
>
> Sorry to bother you again. I was looking at how the driver derives
> mpam_pmg_max, and I think there is a similar blind spot:
>
> mpam_msc_hw_probe() folds every MSC's MPAMF_IDR.PMG_MAX into the
> global mpam_pmg_max, regardless of whether the MSC has any monitors.
>
> Concretely, on our platform the DSU has no monitors and reports
> PMG_MAX=1. Our memory controller MSC has monitors and currently
> reports PMG_MAX=0, but if we later add PMG support and report
> PMG_MAX=31, the global value would still be clamped to 1 by the DSU,
> and resctrl would only expose 2 RMIDs per CLOSID instead of 32.
>
> Should the convergence only consider MSCs that have monitors?

No, the PMG_MAX can also indicate the largest propagated and so still
needs to be taken into account. Rules I_GSHTX and I_BTFZC are relevant here.

Thanks,

Ben

> The PE-side value from MPAMIDR_EL1.PMG_MAX would still apply, as
> that is the maximum PMG the cores can tag traffic with.
>
> Thanks,
> Ping