Re: [PATCH v6 21/40] arm_mpam: resctrl: Hide CDP emulation behind CONFIG_EXPERT

From: Gavin Shan

Date: Mon Mar 23 2026 - 18:36:58 EST


On 3/14/26 12:45 AM, Ben Horgan wrote:
When CDP is not enabled, the 'rmid_entry's in the limbo list,
rmid_busy_llc, map directly to a (PARTID,PMG) pair and when CDP is enabled
the mapping is to two different pairs. As the limbo list is reused between
mounts and CDP disabled on unmount this can lead to stale mapping and the
limbo handler will then make monitor reads with potentially out of range
PARTID. This may then cause an MPAM error interrupt and the driver will
disable MPAM.

No problems are expected if you just mount the resctrl file system
once with CDP enabled and never unmount it. Hide CDP emulation behind
CONFIG_EXPERT to protect the unwary.

Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
Adding this ugliness in the hope of avoiding patch churn and extra
reviewer work. I am looking into the resctrl changes needed to fix this.
---
drivers/resctrl/mpam_resctrl.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>