Re: [PATCH v2 2/2] mm/memory_hotplug: Add support to unaccept memory after hot-remove

From: Kiryl Shutsemau

Date: Tue Jan 13 2026 - 05:28:58 EST


On Mon, Jan 12, 2026 at 02:23:00PM -0600, Pratik R. Sampat wrote:
> Transition memory to the shared state during a hot-remove operation so
> that it can be re-used by the hypervisor. This also applies when memory
> is intended to be hotplugged back in later, as those pages will need to
> be re-accepted after crossing the trust boundary.

Hm. What happens when we hot-remove memory that was there at the boot
and there's bitmap space for it?

Also, I'm not sure why it is needed. At least in TDX case, VMM can pull
the memory from under guest at any time without a warning. Coverting
memory to shared shouldn't make a difference as along as re-adding the
same GPA range triggers accept.

--
Kiryl Shutsemau / Kirill A. Shutemov