Re: [PATCH v5 7/7] KVM: guest_memfd: Rework PREPARE config and hook into a more generic CONVERT
From: Sean Christopherson
Date: Thu Jul 23 2026 - 16:37:52 EST
On Wed, Jul 22, 2026, Xiaoyao Li wrote:
> On 7/22/2026 12:24 AM, Sean Christopherson wrote:
> > I.e. have this at the end of this prep work:
> >
> > static bool kvm_gmem_is_private_mem(struct inode *inode, pgoff_t index)
> > {
> > return kvm_arch_has_private_mem(kvm) &&
> > !(GMEM_I(inode)->flags & GUEST_MEMFD_FLAG_INIT_SHARED);
> > }
>
> I'm wondering if we really need to check kvm_arch_has_private_mem() here. It
> looks checking GUEST_MEMFD_FLAG_INIT_SHARED is sufficient.
Ya, I came to the same conclusion and ended up dropping that line so that the
patch would be a guaranteed "No functional change intended".