Re: [RFC PATCH kernel] iommufd: Allow mapping from KVM's guest_memfd
From: Jason Gunthorpe
Date: Thu Feb 26 2026 - 19:21:13 EST
On Thu, Feb 26, 2026 at 02:40:50PM -0800, Sean Christopherson wrote:
> > If guestmemfd is fully pinned and cannot free memory outside of
> > truncate that may be good enough (though somehow I think that is not
> > the case)
>
> With in-place conversion, PUNCH_HOLE and private=>shared conversions are the only
> two ways to partial "remove" memory from guest_memfd, so it may really be that
> simple.
PUNCH_HOLE can be treated like truncate right?
I'm confused though - I thought in-place conversion ment that
private<->shared re-used the existing memory allocation? Why does it
"remove" memory?
Or perhaps more broadly, where is the shared memory kept/accessed in
these guest memfd systems?
Jason