Re: [RFC][PATCH 6/6] x86/resctrl: Fix SNC detection
From: Luck, Tony
Date: Thu Feb 26 2026 - 14:42:17 EST
On Thu, Feb 26, 2026 at 11:49:15AM +0100, Peter Zijlstra wrote:
> Now that the x86 topology code has a sensible nodes-per-package
> measure, that does not depend on the online status of CPUs, use this
> to divinate the SNC mode.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> arch/x86/kernel/cpu/resctrl/monitor.c | 44 ----------------------------------
> 1 file changed, 1 insertion(+), 43 deletions(-)
>
> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
> @@ -364,51 +364,9 @@ void arch_mon_domain_online(struct rdt_r
> msr_clear_bit(MSR_RMID_SNC_CONFIG, 0);
> }
>
> -/* CPU models that support MSR_RMID_SNC_CONFIG */
> -static const struct x86_cpu_id snc_cpu_ids[] __initconst = {
> - X86_MATCH_VFM(INTEL_ICELAKE_X, 0),
> - X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, 0),
> - X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, 0),
> - X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, 0),
> - X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, 0),
> - X86_MATCH_VFM(INTEL_ATOM_DARKMONT_X, 0),
> - {}
> -};
It isn't safe to drop this and the x86_match_cpu() check.
These are the CPUs that implement SNC and MSR_RMID_SNC_CONFIG. So if you
set __num_nodes_per_package > 1 on an older CoD system Linux will
think this is SNC and poke this MSR (and get #GP).
-Tony