Skip to content

KVM: selftests: Add test case for readonly memslots on x86

Yohei Kojima kvm linux-kselftest lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: selftests: Extract memslot setup code from spawn_vm()tools/testing/selftests/kvm/set_memory_region_test.c+29 -180 replies
2/2KVM: selftests: Add test case for readonly memslots on x86tools/testing/selftests/kvm/set_memory_region_test.c+100 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: selftests: Add test case for readonly memslots on x86

Currently, there are no x86 test cases to verify that read and execute on RO-memslot succeeds, and write is blocked as MMIO fault. This behavior might break if changes are made to the MMIO path, because x86's RO-memslot relies on the fault propagation mechanism for MMIO.

The first patch adds a function vm_userspace_mem_region_add_map(), which is essentially the memslot setup code extracted from spawn_vm(). The second patch adds an x86 test case for read/write/exec on RO-memslot.

This series is developed based on kvm/master, although this series adds a test case for x86. This is because the first patch changes the spawn_vm() function, which is used in the tests for other architectures.

base-commit: 0de4a0eec25b9171f2a2abb1a820e125e6797770

Yohei Kojima (2):
KVM: selftests: Extract memslot setup code from spawn_vm()
KVM: selftests: Add test case for readonly memslots on x86

 .../selftests/kvm/set_memory_region_test.c    | 147 +++++++++++++++---
 1 file changed, 129 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0