PLZA (Privilege Level Zero Association) provides the global per-CPU kernel mode, RESCTRL_GLOBAL_ENABLE_PER_CPU, allowing kernel work to use allocation and monitoring associations that differ from user tasks. Add x86 support for this kernel mode and make it available through the resctrl kernel-mode infrastructure. Signed-off-by: Babu Moger --- v6: Use RESCTRL_GLOBAL_ENABLE_PER_CPU. Rewrite changelog (not a bugfix). v5: Update the patch to adapt new data structure and resctrl_set_kmode_support() changes. v4: New patch to set the supported features during arch init. --- arch/x86/kernel/cpu/resctrl/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 4ca8bedeb995..fc59d66f77de 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -1021,6 +1021,10 @@ static __init bool get_rdt_resources(void) rdt_alloc_capable = get_rdt_alloc_resources(); rdt_mon_capable = get_rdt_mon_resources(); + if (rdt_cpu_has(X86_FEATURE_PLZA) && + (rdt_alloc_capable || rdt_mon_capable)) + resctrl_set_kmode_support(RESCTRL_GLOBAL_ENABLE_PER_CPU); + return (rdt_mon_capable || rdt_alloc_capable); } -- 2.43.0