[RFC][PATCH 0/6] x86/topo: SNC Divination

From: Peter Zijlstra

Date: Thu Feb 26 2026 - 05:55:32 EST


Hi!

So we once again ran head-first into the fact that the CPUs fail to enumerate
useful state. This time it is SNC (again).

Thomas recently rewrote much of the topology code to use MADT and CPUID to
derive many of the useful measure of the system *before* SMP bringup. Removing
much broken magic.

Inspired by that, I wondered if we might do the same for SNC. Clearly MADT is
not sufficient, however combined with SRAT we should have enough.

Further luck will have it that by the time MADT gets parsed, SRAT is already
parsed, so integrating them is mostly straight forward. The only caveat is that
numa_emulation can mess things up in between.

Combining all this gives a straight forward measure of nodes-per-package, which
should reflect the SNC mode. All before SMP bringup.

Use this to 'fix' various SNC snafus.

Compile and boot tested on non SNC only for now; I'll see if I can convince
qemu to play along.