[PATCH v2 0/2] Skip SNP initialization if CPUs are offlined

From: Tycho Andersen

Date: Tue Apr 07 2026 - 13:49:31 EST


From: "Tycho Andersen (AMD)" <tycho@xxxxxxxxxx>

Here's a v2 of the series. Changes are:

* propagate the error from snp_prepare() through __sev_snp_init_locked()
* use cpus_present_mask instead of cpus_possible_mask to reason about
the set of available CPUs
* print the CPU masks for easier debugging

It turns out that CONFIG_INIT_ALL_POSSIBLE is not user-settable, and
only parisc selects it, so it shouldn't be a problem here.

v1 is here: https://lore.kernel.org/all/20260401143552.3038979-1-tycho@xxxxxxxxxx/

Tycho Andersen (AMD) (2):
x86/sev: Do not initialize SNP if missing CPUs
crypto/ccp: Skip SNP_INIT if preparation fails

arch/x86/include/asm/sev.h | 4 ++--
arch/x86/virt/svm/sev.c | 15 +++++++++++++--
drivers/crypto/ccp/sev-dev.c | 4 +++-
3 files changed, 18 insertions(+), 5 deletions(-)


base-commit: 6c927e5ca9d238f8ae40b453a8382eb9cf4ee855
--
2.53.0