Re: [PATCH 01/11] x86/snp: drop support for SNP hotplug

From: Borislav Petkov

Date: Fri Mar 06 2026 - 10:40:48 EST


On Mon, Mar 02, 2026 at 12:13:24PM -0700, Tycho Andersen wrote:
> From: "Tycho Andersen (AMD)" <tycho@xxxxxxxxxx>
>
> During an SNP_INIT(_EX), the SEV firmware checks that all CPUs have SNPEn
> 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.
>
> Futher, there is a bug: SNP_INIT(_EX) require MFDM to be set in addition to
> SNPEn which the previous hotplug code did not do. Since
> k8_check_syscfg_dram_mod_en() enforces this be cleared, hotplug wouldn't
> work.
>
> Drop the hotplug code. Collapse the __{mfd,snp}__enable() wrappers into
> their non-__ versions, since the cpu number argument is no longer needed.
>
> Signed-off-by: Tycho Andersen (AMD) <tycho@xxxxxxxxxx>
> ---
> arch/x86/virt/svm/sev.c | 24 ++++--------------------
> 1 file changed, 4 insertions(+), 20 deletions(-)

Btw, this one conflicts with Ashish's

https://lore.kernel.org/r/85aec55af41957678d214e9629eb6249b064fa87.1772486459.git.ashish.kalra@xxxxxxx

Considering how yours is removing code and is almost ready, I'd suggest you
send a new version of it now-ish, as a reply to this thread and after
incorporating all feedback, so that I can apply it first and then Ashish can
base his stuff ontop.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette