Re: [RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2025-04-23 Thread Ackerley Tng
Yan Zhao writes: > On Tue, Sep 10, 2024 at 11:43:58PM +, Ackerley Tng wrote: >> guest_memfd files can always be mmap()ed to userspace, but >> faultability is controlled by an attribute on the inode. >> >> Co-developed-by: Fuad Tabba >> Signed-off-by: Fuad Tabba >> Co-developed-by: Ackerley

Re: [RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2025-04-23 Thread Ackerley Tng
Peter Xu writes: > On Tue, Sep 10, 2024 at 11:43:58PM +, Ackerley Tng wrote: >> @@ -790,6 +791,9 @@ static long kvm_gmem_punch_hole(struct inode *inode, >> loff_t offset, loff_t len) >> */ >> filemap_invalidate_lock(inode->i_mapping); >> >> +/* TODO: Check if even_cows shoul

Re: [RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2025-04-01 Thread Yan Zhao
On Tue, Sep 10, 2024 at 11:43:58PM +, Ackerley Tng wrote: > guest_memfd files can always be mmap()ed to userspace, but > faultability is controlled by an attribute on the inode. > > Co-developed-by: Fuad Tabba > Signed-off-by: Fuad Tabba > Co-developed-by: Ackerley Tng > Signed-off-by: Acke

Re: [RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2025-03-04 Thread Peter Xu
On Tue, Sep 10, 2024 at 11:43:58PM +, Ackerley Tng wrote: > @@ -790,6 +791,9 @@ static long kvm_gmem_punch_hole(struct inode *inode, > loff_t offset, loff_t len) >*/ > filemap_invalidate_lock(inode->i_mapping); > > + /* TODO: Check if even_cows should be 0 or 1 */ > + u

Re: [RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2025-01-20 Thread Peter Xu
On Tue, Sep 10, 2024 at 11:43:58PM +, Ackerley Tng wrote: > @@ -790,6 +791,9 @@ static long kvm_gmem_punch_hole(struct inode *inode, > loff_t offset, loff_t len) >*/ > filemap_invalidate_lock(inode->i_mapping); > > + /* TODO: Check if even_cows should be 0 or 1 */ > + u

[RFC PATCH 27/39] KVM: guest_memfd: Allow mmapping guest_memfd files

2024-09-10 Thread Ackerley Tng
guest_memfd files can always be mmap()ed to userspace, but faultability is controlled by an attribute on the inode. Co-developed-by: Fuad Tabba Signed-off-by: Fuad Tabba Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng --- virt/kvm/guest_memfd.c | 46