Thread (145 messages) flat view 145 messages, 11 authors, 23d ago

Re: [PATCH v10 40/41] KVM: selftests: Update private_mem_conversions_test to mmap() guest_memfd

From: Xiaoyao Li <hidden>
Date: 2026-08-21 03:12:12
Also in: kvm, linux-doc, linux-kselftest, linux-mm, linux-trace-kernel, lkml

On 8/8/2026 5:53 AM, Ackerley Tng via B4 Relay wrote:
From: Ackerley Tng<redacted>

Update the private memory conversions selftest to also test conversions
that are done "in-place" via per-guest_memfd memory attributes. In-place
conversions require the host to be able to mmap() the guest_memfd so that
the host and guest can share the same backing physical memory.

This includes several updates, that are conditioned on the system
supporting per-guest_memfd attributes (kvm_has_gmem_attributes):

1. Set up guest_memfd requesting MMAP and INIT_SHARED.
If I understand correctly, even with in-place gmem, the model that 
shared memory comes from the userspace_addr and private memory comes 
from gmem can still work without passing GUEST_MEMFD_FLAG_MMAP flag.

Since this model is not prohibited by KVM. I think we should keep the 
testcase for this model to ensure test coverage?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help