Re: [PATCH v6 0/9] Introduce MMIO-based CMT access for Enhanced RDT

From: Chen Yu

Date: Thu Aug 13 2026 - 02:43:57 EST


Update for Sashiko review: https://sashiko.dev/#/patchset/cover.1784968626.git.yu.c.chen%40intel.com

TL;DR
Sashiko reported 9 issues in total, after evaluation, 1/9 is a valid concern. The next
v7 version will be posted with that fix, after v7's direction has been confirmed by the
resctrl community.

The issue sashiko reported:

Patch 9: [PATCH v6 9/9] x86/resctrl: Add MMIO-based LLC occupancy monitoring support
> diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
> index 786828a0a3c2c..d33a865e59d48 100644
> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
[ ... ]
> @@ -430,12 +434,15 @@ int __init rdt_get_l3_mon_config(struct rdt_resource *r)
> struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r);
> unsigned int threshold;
> u32 eax, ebx, ecx, edx;
> + int max_rmid;
>
> snc_nodes_per_l3_cache = snc_get_config();
>
> + max_rmid = erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) ?
> + erdt_get_max_rmid() : boot_cpu_data.x86_cache_max_rmid;
> resctrl_rmid_realloc_limit = boot_cpu_data.x86_cache_size * 1024;
> hw_res->mon_scale = boot_cpu_data.x86_cache_occ_scale / snc_nodes_per_l3_cache;
> - r->mon.num_rmid = (boot_cpu_data.x86_cache_max_rmid + 1) / snc_nodes_per_l3_cache;
> + r->mon.num_rmid = (max_rmid + 1) / snc_nodes_per_l3_cache;
If the ERDT table specifies a max_rmid that is larger than the hardware MSR
limit, could this cause an unhandled #GP exception?

Yes, we should use the min of these two:
+ max_rmid = erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) ?
+ min(erdt_get_max_rmid(), boot_cpu_data.x86_cache_max_rmid) :
+ boot_cpu_data.x86_cache_max_rmid;

thanks,
Chenyu