On Wed, 16 Jul 2025 at 11:31, David Hildenbrand <david@xxxxxxxxxx> wrote: > > On 16.07.25 10:21, Fuad Tabba wrote: > > Hi Xiaoyao, > > > > On Wed, 16 Jul 2025 at 07:11, Xiaoyao Li <xiaoyao.li@xxxxxxxxx> wrote: > >> > >> On 7/15/2025 5:33 PM, Fuad Tabba wrote: > >>> Add a new internal flag, KVM_MEMSLOT_GMEM_ONLY, to the top half of > >>> memslot->flags. This flag tracks when a guest_memfd-backed memory slot > >>> supports host userspace mmap operations. It's strictly for KVM's > >>> internal use. > >> > >> I would expect some clarification of why naming it with > >> KVM_MEMSLOT_GMEM_ONLY, not something like KVM_MEMSLOT_GMEM_MMAP_ENABLED > >> > >> There was a patch to check the userspace_addr of the memslot refers to > >> the same memory as guest memfd[1], but that patch was dropped. Without > >> the background that when guest memfd is mmapable, userspace doesn't need > >> to provide separate memory via userspace_addr, it's hard to understand > >> and accept the name of GMEM_ONLY. > > > > The commit message could have clarified this a bit more. Regarding the > > rationale for the naming, there have been various threads and live > > discussions in the biweekly guest_memfd meeting . Instead of rehashing > > the discussion here, I can refer you to a couple [1, 2]. > > Maybe clarify here: > > "Add a new internal flag, KVM_MEMSLOT_GMEM_ONLY, to the top half of > memslot->flags. This flag tracks when a guest_memfd-backed memory slot > supports host userspace mmap operations, which implies that all memory, > not just private memory for CoCo VMs, is consumed through guest_memfd: > "gmem only" > > And add a pointer to the list discussion. Ack. Thanks, /fuad > -- > Cheers, > > David / dhildenb >