]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/virt/sev: Drop support for SNP hotplug
authorTycho Andersen (AMD) <tycho@kernel.org>
Mon, 9 Mar 2026 18:00:43 +0000 (12:00 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 9 Mar 2026 20:48:33 +0000 (21:48 +0100)
commit959d3f7565352fab844ae73a722631c5f615427f
treea63a5516b1167d2a5578cf05c3e16be3e760c2e8
parent1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
x86/virt/sev: Drop support for SNP hotplug

During an SNP_INIT(_EX), the SEV firmware checks that all CPUs have the SNP
syscfg bit set, and fails if they do not. As such, it does not make
sense to have offline CPUs: the firmware will fail initialization because
of the offlined ones that the kernel did not initialize.

Further, there is a bug: during SNP_INIT(_EX) the firmware requires the MFDM
syscfg bit to be set in addition to having SNP enabled, which the previous
hotplug code did not do. Since k8_check_syscfg_dram_mod_en() enforces this
be cleared, hotplug wouldn't work.

Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://patch.msgid.link/20260309180053.2389118-2-tycho@kernel.org
arch/x86/virt/svm/sev.c