[PATCH v2 05/16] x86/resctrl: Initialize supported kernel modes when CPUID reports PLZA

Babu Moger
2026-03-12T20:38:26Z

If X86_FEATURE_PLZA is set, add GLOBAL_ASSIGN_CTRL_INHERIT_MON and
GLOBAL_ASSIGN_CTRL_ASSIGN_MON to the supported kmode bits in
resctrl_arch_get_kmode_cfg().

Signed-off-by: Babu Moger <babu.moger@amd.com>
---
v2: New patch to handle PLZA interfaces with /sys/fs/resctrl/info/ directory.
https://lore.kernel.org/lkml/2ab556af-095b-422b-9396-f845c6fd0342@intel.com/
---
arch/x86/kernel/cpu/resctrl/core.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 8fb9029fe547..739190ac96d3 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -898,6 +898,9 @@ void resctrl_arch_get_kmode_cfg(struct resctrl_kmode_cfg *kcfg)
{
kcfg->kmode = INHERIT_CTRL_AND_MON;
kcfg->kmode_cur = INHERIT_CTRL_AND_MON;
+ if (rdt_cpu_has(X86_FEATURE_PLZA))
+ kcfg->kmode |= GLOBAL_ASSIGN_CTRL_INHERIT_MON |
+ GLOBAL_ASSIGN_CTRL_ASSIGN_MON;
kcfg->k_rdtgrp = NULL;
}

--
2.43.0