Re: [RFC PATCH 0/9] mm: Memory providers for guest_memfd and iommufd
From: Aneesh Kumar K . V
Date: Sat Oct 10 2026 - 03:36:48 EST
Fred Griffoul <griffoul@xxxxxxxxx> writes:
> From: Fred Griffoul <fgriffo@xxxxxxxxxxxx>
>
> Some drivers manage RAM outside the page allocator: a carve-out, device
> memory, or memory that a host component moves between VMs while they
> run. This memory often has no struct page. The driver wants to lend
> pages to a VM and to its devices, and to take any of them back later.
>
> David Woodhouse's series "KVM: Allow alternative providers of
> guest_memfd backed by PFNMAP memory" lets such a driver back a
> guest_memfd through struct kvm_gmem_ops:
>
> https://lore.kernel.org/kvm/20260720111259.122911-1-dwmw2@xxxxxxxxxxxxx/
>
> That covers the guest, but not the VM's devices, which his cover
> letter left as an open question. This series adds a small interface in
> mm: the driver that owns the memory becomes a provider, and the code
> that maps it attaches as a consumer. There are two consumers, a
> guest_memfd backend and IOMMU_IOAS_MAP_FILE in iommufd.
>
> The series is on top of David's v2 (base 0e35b9b6ec0f). Patch 1 was
> part of the earlier dma-buf RFC. The provider backend depends on it, so
> this series carries it.
>
I have been working on something similar for confidential computing use
cases. There is likely some overlap between this series and what I posted
at [1].
I have not reviewed this series in detail yet, but I will compare the two
approaches and identify what can be shared between the use cases. Please
let me know how you would like to proceed.
[1] https://lore.kernel.org/all/20261010072504.536230-1-aneesh.kumar@xxxxxxxxxx/
-aneesh