Re: [RFC v2] arm,x86,fs/resctrl: Generic schema description Proof of Concept

From: Chen Yu

Date: Sun Sep 13 2026 - 23:08:44 EST


Hi Reinette,

On Mon, Aug 10, 2026 at 11:09:31AM -0700, Reinette Chatre wrote:
>
> From user space view "legacy" is the existing percentage based MB control
> that user space has been using until now. The only way to support this "legacy"
> user interface with region-aware hardware is to use the MSR interface, no?
> User space does not care whether the hardware uses MSR or MMIO, it just uses
> the MB interface.
> That is, as you also say, until it is possible to map legacy control value to
> region-aware control value at which point the MMIO interface can be used and
> user space can continue to use the MB control without interruption.
>

While looking at the context of control_mode under the info directory, it is
currently used only for the controller to switch between "legacy" and "native".
However, there is also an explicit requirement for the MBM to switch between
"legacy" and "native" TOGETHER with the MBA.

According to the RDT spec 6.1.3.1 RDT Control Register for CPU Agents,
it discourages mixing legacy MSR for MBM with region aware MBA:
"It is recommended that software use Region Aware MBM when Region Aware
MBA is enabled and vice versa. Mixed mode use (e.g, legacy MSR
interfaces for MBM with Region Aware MBA or vice versa) is not
supported and may lead to inconsistent behavior"

That is to say, I'm trying to add logic in the code so that, if control_mode
has switched, the corresponding "mode" for MBM will also be adjusted to the
same mode. The code can enable/create both legacy MBM events/sysfs and region-aware
MBM events/sysfs during bootup, and make one of them visible according to control_mode,
similar to what Babu does in PLZA when hiding a file in
https://lore.kernel.org/lkml/f7bcf19ac8113a1e3d9575739c1a6400c455ce6d.1787772750.git.babu.moger@xxxxxxx/

May I know whether this approach is doable?

thanks,
Chenyu