Re: [PATCH v1 1/2] x86/sev: Do not initialize SNP if missing CPUs
From: Borislav Petkov
Date: Fri Apr 03 2026 - 13:23:17 EST
On Fri, Apr 03, 2026 at 08:31:24AM -0500, Tom Lendacky wrote:
> > + if (!cpumask_equal(cpu_online_mask, cpu_possible_mask))
>
> If CONFIG_INIT_ALL_POSSIBLE is set, won't that set cpu_possible_mask to
> include all CPUs up to NR_CPUS? That would result in this always failing.
Yah,
sashiko gave another possible situation where this can fail:
https://sashiko.dev/#/patchset/20260401143552.3038979-1-tycho%40kernel.org
> Not sure if this change is worth it.
Well, it would save us a lot of effort if we can check at module load time
whether some CPUs are offlined. A very simple use case:
echo 0 > /sys/devices/system/cpu.../online
modprobe ccp
<boom>.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette