Re: [PATCH] tdx, memory hotplug: Check whole hot-adding memory range for TDX

From: David Hildenbrand
Date: Tue Oct 01 2024 - 03:55:02 EST


Because only TDX compatible memory can be used for TDX guest. The buddy
is used to allocate memory for TDX guest. While devdax will not be used
for that.

This also makes the original TDX memory hotplug notifier useless, so
delete it.

The online-notifier would even be too late when used with the
memmap-on-memory feature I assume, as we might be touching that memory
even before being able to call memory online notifiers.

This should be OK. Because we will not use the memory for TDX guest in
this way.

Thanks for the reminder, I keep assuming that we are hotplugging memory into the guest, not the hypervisor.

Having that as a comment in tdx_check_hotplug_memory_range() would be helpful: we don't allow mixture of TDX and !TDX memory in the buddy so we won't run into trouble when launching encrypted VMs that really need TDX-capable memory.

--
Cheers,

David / dhildenb