Re: [RFC PATCH 13/19] x86/resctrl: Add PLZA state tracking and context switch handling

From: Ben Horgan

Date: Thu Feb 19 2026 - 12:46:05 EST


Hi Tony,

On 2/19/26 17:03, Luck, Tony wrote:
>> Likely real implementation:
>>
>> Sub-components of each of the ideas above are encoded as a bitmask that
>> is written to plza_mode. There is a file in the info/ directory listing
>> which bits are supported on the current system (e.g. the "keep the same
>> RMID" mode may be impractical on ARM, so it would not be listed as an
>> option.)
>
>
> In x86 terms where control and monitor functions are independent we
> have:
>
> Control:
> 1) Use default (CLOSID==0) for kernel
> 2) Allocate just one CLOSID for kernel
> 3) Allocate many CLOSIDs for kernel
>
> Monitor:
> 1) Do not monitor kernel separately from user
> 2) Use default (RMID==0) for kernel
> 3) Allocate one RMID for kernel
> 4) Allocate many RMIDs for kernel
>
> What options are possible on ARM & RISC-V?

For ARM (MPAM) we have the same flexibility that we have for userspace
as the kernel. At EL0 (userspace) the configuration of parid/pmg is in
SYS_MPAM0_EL1 and in EL1 (kernel) it's in SYS_MPAM1_EL1. These are both
per-cpu system registers and control the partid and pmg the cpu adds to
its requests at the particular exception level (EL).

Of the above we can do all the control, 1,2,3 and all the monitor except
1, so 2,3,4. With the caveat that if more than one partid/closid is
used for the kernel then at least that number of pmg/monitors are used.
This is as the monitors are not independent (as you say), i.e. a monitor
is identified by the pair (partid, pmg).

>
> -Tony


Thanks,

Ben