Re: [PATCH v3 00/12] x86/resctrl: Add kernel-mode (e.g., PLZA) support to the resctrl subsystem

From: Babu Moger

Date: Tue Jun 09 2026 - 10:18:40 EST


Hi Qinyun,

On 6/8/26 04:23, Qinyun Tan wrote:
Hi Babu,

While reviewing this series I noticed two cross-architecture issues.

1) aarch64 allyesconfig link failure

resctrl_arch_configure_kmode() and resctrl_arch_get_kmode_support()
are declared in include/linux/resctrl.h:

void resctrl_arch_get_kmode_support(struct resctrl_kmode_cfg *kcfg);
void resctrl_arch_configure_kmode(const struct cpumask *cpu_mask,
u32 closid, u32 rmid, bool enable);

but only implemented under arch/x86/. ARM MPAM selects
CONFIG_RESCTRL_FS, so fs/resctrl/rdtgroup.c is compiled on aarch64
and the linker fails:

ld: fs/resctrl/rdtgroup.o: in function `rdtgroup_config_kmode_clear':
rdtgroup.c: undefined reference to `resctrl_arch_configure_kmode'
ld: fs/resctrl/rdtgroup.o: in function `resctrl_init':
rdtgroup.c: undefined reference to `resctrl_arch_get_kmode_support'

Other arch-specific functions already have empty stubs in
drivers/resctrl/mpam_resctrl.c, e.g.:

int resctrl_arch_io_alloc_enable(struct rdt_resource *r, bool enable)
{
return -EOPNOTSUPP;
}

Adding the same for the two kmode functions would fix the build.

Good catch. Will add in empty stubs in next revision for these 3 functions.


2) info/kernel_mode visible on non-PLZA platforms

The "kernel_mode" entry is registered with fflags = RFTYPE_TOP_INFO:

{
.name = "kernel_mode",
.mode = 0644,
...
.fflags = RFTYPE_TOP_INFO,
},

This makes the file appear unconditionally under info/ -- even on
platforms without PLZA (ARM MPAM, older AMD/Intel without
X86_FEATURE_PLZA). On those platforms the file only shows the
default inherit_ctrl_and_mon mode, which is confusing since there
are no other modes to switch to.

This is expected. We intended to expose the info/kernel_mode file for all architectures, and it will display the default mode inherit_ctrl_and_mon.

This approach was also suggested by Reinette.
https://lore.kernel.org/lkml/2ab556af-095b-422b-9396-f845c6fd0342@xxxxxxxxx/

Thanks
Babu