On 7/17/2025 4:49 PM, Fuad Tabba wrote:
On Thu, 17 Jul 2025 at 02:48, Xiaoyao Li<xiaoyao.li@xxxxxxxxx> wrote:
On 7/17/2025 8:12 AM, Ackerley Tng wrote:
Xiaoyao Li<xiaoyao.li@xxxxxxxxx> writes:
...
Btw, it seems that supports_gmem can be enabled for all the types of VM?
For now, not really, because supports_gmem allows mmap support, and mmap
support enables KVM_MEMSLOT_GMEM_ONLY, and KVM_MEMSLOT_GMEM_ONLY will
mean that shared faults also get faulted from guest_memfd.
No, mmap support is checked by kvm_arch_supports_gmem_mmap() which is
independent to whether gmem is supported.
It is dependent on gmem support:
kvm_arch_supports_gmem_mmap(kvm) depends on
CONFIG_KVM_GMEM_SUPPORTS_MMAP, which in turn selects KVM_GMEM.
My bad that my words leads to misunderstanding.
What I wanted to express it that support_gmem doesn't mean mmap support
is allowed, there is additional specific guard for mmap support via
kvm_arch_supports_gmem_mmap().