Ackerley Tng [off-list ref] writes:
From: Sean Christopherson <seanjc@google.com>
Add a test to verify that a guest_memfd's shared/private status is
consistent across processes.
Missed copying Sean's note from [1]. Rephrased:
Test that on shared to private conversion, any shared pages previously
mapped in any process are unmapped from all processes.
[1] https://lore.kernel.org/all/aN7U1ewx8dNOKl1n@google.com/ (local)
The test forks a child process after creating the shared guest_memfd
region so that the second process exists alongside the main process for the
entire test.
The processes then take turns to access memory to check that the
shared/private status is consistent across processes.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Co-developed-by: Ackerley Tng <redacted>
Signed-off-by: Ackerley Tng <redacted>
---
.../kvm/guest_memfd_conversions_test.c | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
[...snip...]