Re: [tip: x86/urgent] x86/resctrl: Fix SNC detection

From: Luck, Tony

Date: Tue Apr 28 2026 - 16:53:28 EST


On Tue, Apr 28, 2026 at 03:41:51PM -0500, Babu Moger wrote:
> Hi Tony,
...
> Saw these messages on AMD system(7.1.0-rc1).
>
> sudo dmesg |grep CoD
> [ 6.614667] resctrl: CoD enabled system? Resctrl not supported
>
>
> Might confuse some users. Not a big deal. But we should fix it in next
> version.

Babu,

Indeed yes. Thanks for letting me know.

I think this should fix it. Can you test please?

-Tony

---

diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
index 497cc57ac135..3d72ff5d0c25 100644
--- a/arch/x86/kernel/cpu/resctrl/monitor.c
+++ b/arch/x86/kernel/cpu/resctrl/monitor.c
@@ -374,7 +374,12 @@ static const struct x86_cpu_id snc_cpu_ids[] __initconst = {

static __init int snc_get_config(void)
{
- int ret = topology_num_nodes_per_package();
+ int ret;
+
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
+ return 1;
+
+ ret = topology_num_nodes_per_package();

if (ret > 1 && !x86_match_cpu(snc_cpu_ids)) {
pr_warn("CoD enabled system? Resctrl not supported\n");
>