Re: [PATCH 0/5] KVM: guest_memfd: bind backing memory to a NUMA node

From: David Hildenbrand (Arm)

Date: Thu Sep 10 2026 - 10:21:29 EST


On 9/10/26 15:40, Gregory Price wrote:
> On Thu, Sep 10, 2026 at 01:30:04PM +0200, David Hildenbrand (Arm) wrote:
>> On 9/2/26 21:46, Gregory Price wrote:
>>> guest_memfd allocates its folios through a per-inode shared mempolicy.
>>>
>>> Today that policy can only be set after the fact, with mbind() on a host
>>> mmap of the fd. That requires the fd to be mappable, and it cannot reach
>>> folios that are only ever guest-faulted. Neither holds for a
>>> non-mappable (confidential) guest_memfd.
>>
>> That looks like an investment into a mechanism we will soon consider legacy, so
>> I am not convinced this is the right approach?
>>
>
> Hm, I think i've missed recent work in this space / this context.
> Any suggested reading here? Don't want to eat too much of your time.

So the big development happening right now is in-place conversion (having shared
and private pages managed in guest_memfd):

https://lore.kernel.org/r/20260830-gmem-inplace-conversion-v12-0-85e5fd25252a@xxxxxxxxxx


The final series where we added mempolicy support should be:

https://lore.kernel.org/linux-mm/20250827175247.83322-2-shivankg@xxxxxxx/

(I think you are aware of that, you commented on some)

See my other reply regarding the use of GUEST_MEMFD_FLAG_MMAP on private-only
guest_memfd.

--
Cheers,

David