Binbin Wu <[email protected]> writes: > > [...snip...] > >> +static inline bool kvm_mem_range_is_private(struct kvm *kvm, gfn_t start, >> + gfn_t end) >> +{ >> + return kvm_range_has_vm_memory_attributes(kvm, start, end, >> + KVM_MEMORY_ATTRIBUTE_PRIVATE, >> + KVM_MEMORY_ATTRIBUTE_PRIVATE); >> } > > This function is added, but never used in this patch series. > Is it intended to be called only when CONFIG_KVM_VM_MEMORY_ATTRIBUTES is > enabled? >
Thank you for catching this! I think in some earlier revision this was meant to be used from the guest_memfd populate flow. I think the version of kvm_gmem_range_is_private in this revision is good because it is symmetric. If conversion is enabled, call the gmem range-has-attributes function, and if conversion is disabled, use the VM range-has-attributes function. Sean, if no new revision is needed would you be able to drop kvm_mem_range_is_private() while you're pulling it in? >> >> [...snip...] >>
