Re: [PATCH v2 4/5] guest_memfd: add support for userfaultfd minor mode
From: David Hildenbrand (Red Hat)
Date: Wed Nov 26 2025 - 05:25:32 EST
On 11/25/25 19:38, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
userfaultfd notifications about minor page faults used for live migration
and snapshotting of VMs with memory backed by shared hugetlbfs or tmpfs
mappings as described in detail in commit 7677f7fd8be7 ("userfaultfd: add
minor fault registration mode").
To use the same mechanism for VMs that use guest_memfd to map their memory,
guest_memfd should support userfaultfd minor mode.
Extend ->fault() method of guest_memfd with ability to notify core page
fault handler that a page fault requires handle_userfault(VM_UFFD_MINOR) to
complete and add implementation of ->get_shared_folio() to guest_memfd
vm_ops.
Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
No exports and still looks clean to me, nice. :)
--
Cheers
David