On 6/24/2026 10:38 PM, Ackerley Tng wrote: > Binbin Wu <[email protected]> writes: > >> >> [...snip...] >> >>> +bool kvm_gmem_is_private(struct kvm *kvm, gfn_t gfn) >>> +{ >>> + struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); >>> + struct inode *inode; >>> + >>> + /* >>> + * If this gfn has no associated memslot, there's no chance of the gfn >>> + * being backed by private memory, since guest_memfd must be used for >>> + * private memory, >> >> "guest_memfd must be used for private memory" is a bit confusing to me. >> > > Hmm good point. Is the source of confusion that guest_memfd can be used > for both shared and private memory? Yes. > > Perhaps this can be rephrased as: > > guest_memfd is the only provider of private memory and guest_memfd must > be used with a memslot, hence if there's no associated memslot, there's > no chance of this gfn being private. LGTM. > >>> and guest_memfd must be associated with some memslot. >>> + */ >>> + if (!slot) >>> + return 0; >>> + >>> >>> [...snip...] >>> >
- Re: [PATCH v8 01/46] KVM: guest_mem... Ackerley Tng
- [PATCH v8 04/46] KVM: Decouple kvm_has_arch_priv... Ackerley Tng via B4 Relay
- Re: [PATCH v8 04/46] KVM: Decouple kvm_has_... Fuad Tabba
- Re: [PATCH v8 04/46] KVM: Decouple kvm_has_... Binbin Wu
- Re: [PATCH v8 04/46] KVM: Decouple kvm_... Ackerley Tng
- Re: [PATCH v8 04/46] KVM: Decouple ... Sean Christopherson
- [PATCH v8 09/46] KVM: guest_memfd: Introduce fun... Ackerley Tng via B4 Relay
- Re: [PATCH v8 09/46] KVM: guest_memfd: Intr... Fuad Tabba
- Re: [PATCH v8 09/46] KVM: guest_memfd: Intr... Binbin Wu
- Re: [PATCH v8 09/46] KVM: guest_memfd: ... Ackerley Tng
- Re: [PATCH v8 09/46] KVM: guest_mem... Binbin Wu
- [PATCH v8 08/46] KVM: Provide generic interface ... Ackerley Tng via B4 Relay
- Re: [PATCH v8 08/46] KVM: Provide generic i... Fuad Tabba
- Re: [PATCH v8 08/46] KVM: Provide gener... Fuad Tabba
- Re: [PATCH v8 08/46] KVM: Provide g... Suzuki K Poulose
- Re: [PATCH v8 08/46] KVM: Provi... Ackerley Tng
- [PATCH v8 10/46] KVM: guest_memfd: Wire up core ... Ackerley Tng via B4 Relay
- Re: [PATCH v8 10/46] KVM: guest_memfd: Wire... Fuad Tabba
- Re: [PATCH v8 10/46] KVM: guest_memfd: Wire... Binbin Wu
- Re: [PATCH v8 10/46] KVM: guest_memfd: ... Ackerley Tng
- [PATCH v8 13/46] KVM: guest_memfd: Add base supp... Ackerley Tng via B4 Relay
