Re: [PATCH v3 2/2] x86/sev: Add support to unaccept memory after hot-remove
From: Dave Hansen
Date: Wed Jan 28 2026 - 16:15:44 EST
On 1/28/26 12:41, Pratik R. Sampat wrote:
> +static inline void arch_unaccept_memory(phys_addr_t start, phys_addr_t end)
> +{
> + if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) {
> + snp_unaccept_memory(start, end);
> + } else {
> + panic("Cannot unaccept memory: unknown platform\n");
> + }
> +}
This panic() is pretty nasty.
Can't we just disable memory hotplug up front if it's:
!cc_platform_has(CC_ATTR_GUEST_SEV_SNP)
?