Files
Centos-kernel-stream-10/virt
Sebastian Ott 28bc88e640 KVM: guest_memfd: Allow mmap() on guest_memfd for x86 VMs with private memory
JIRA: https://redhat.atlassian.net/browse/RHEL-151899

Allow mmap() on guest_memfd instances for x86 VMs with private memory as
the need to track private vs. shared state in the guest_memfd instance is
only pertinent to INIT_SHARED.  Doing mmap() on private memory isn't
terrible useful (yet!), but it's now possible, and will be desirable when
guest_memfd gains support for other VMA-based syscalls, e.g. mbind() to
set NUMA policy.

Lift the restriction now, before MMAP support is officially released, so
that KVM doesn't need to add another capability to enumerate support for
mmap() on private memory.

Fixes: 3d3a04fad25a ("KVM: Allow and advertise support for host mmap() on guest_memfd files")
Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Tested-by: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20251003232606.4070510-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
(cherry picked from commit 44c6cb9fe9888b371e31165b2854bd0f4e2787d4)
Signed-off-by: Sebastian Ott <sebott@redhat.com>
2026-05-04 16:44:24 +02:00
..