Re: [RFC PATCH 26/39] KVM: guest_memfd: Track faultability within a struct kvm_gmem_private
From: Jason Gunthorpe
Date: Thu Oct 17 2024 - 12:47:42 EST
On Thu, Oct 17, 2024 at 10:58:29AM -0400, Peter Xu wrote:
> My question was more torwards whether gmemfd could still expose the
> possibility to be used in VA forms to other modules that may not support
> fd+offsets yet.
I keep hearing they don't want to support page pinning on a guestmemfd
mapping, so VA based paths could not work.
> I think as long as we can provide gmemfd VMAs like what this series
> provides, it sounds possible to reuse the old VA interfaces before the CoCo
> interfaces are ready, so that people can already start leveraging gmemfd
> backing pages.
And you definitely can't get the private pages out of the VA interface
because all the VMA PTEs of private pages are non-present by definition.
Hence, you must use the FD for a lot of use cases here.
Jason