]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: selftests: Add guest_memfd testcase to fault-in on !mmap()'d memory
authorSean Christopherson <seanjc@google.com>
Tue, 29 Jul 2025 22:54:55 +0000 (15:54 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 27 Aug 2025 08:41:34 +0000 (04:41 -0400)
commit42188667be387867d2bf763d028654cbad046f7b
tree0a5b8e5566f45aa5d7fc68f7acd5178b09c44546
parenta11d7124b4dd4d78bb7f7257abdb33cb5dd924b8
KVM: selftests: Add guest_memfd testcase to fault-in on !mmap()'d memory

Add a guest_memfd testcase to verify that a vCPU can fault-in guest_memfd
memory that supports mmap(), but that is not currently mapped into host
userspace and/or has a userspace address (in the memslot) that points at
something other than the target guest_memfd range.  Mapping guest_memfd
memory into the guest is supposed to operate completely independently from
any userspace mappings.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250729225455.670324-25-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/guest_memfd_test.c