Re: [PATCH 5/5] arm_mpam: detect and enable MPAM-Fb PCC support

From: Andre Przywara

Date: Thu May 21 2026 - 13:22:07 EST


Hi Niyas,

On 5/18/26 13:14, Niyas Sait wrote:
Hi Andre,

On Wed, Apr 29, 2026 at 04:13:39PM +0200, Andre Przywara wrote:

+ msc->pcc_chan = pcc_mbox_request_channel(&msc->pcc_cl,
+ pcc_subspace_id);
+ if (IS_ERR(msc->pcc_chan)) {
+ pr_err("Failed to request MSC PCC channel\n");
+ return (void *)msc->pcc_chan;
+ }
+
+ if (msc->pcc_chan->shmem_size < MPAM_FB_MAX_MSG_SIZE) {
+ pr_err("MPAM-Fb PCC channel size too small.\n");
+ pcc_mbox_free_channel(msc->pcc_chan);
+ return ERR_PTR(-ENOMEM);
+ }

I think this allocates one PCC channel per MSC instance.

MPAM-Fb spec. allows MPAM manager to support multiple MSCs and does not

Ouch, that's right, the MSC ID parameter in the protocol would be pretty pointless otherwise ;-)
I guess me testing with just one MSC kind of hides this problem ;-)

require seperate channels per MSC. Each MSC is targeted via its msc_id
in the MPAM_MSC_READ/WRITE commands.

So for systems where multiple MSC nodes point to the same PCC subspace,
should we share one pcc_mbox_chan and serialize requests through it?

I think we serialise already, because we have this pcc_chan_lock. This makes sure that each access is done in isolation. But on the setup side we need to indeed make sure to share an already allocated channel, which required some code changes.

Thanks for pointing this out!

Cheers,
Andre