linux/tools/testing/selftests/kvm
Paolo Bonzini fa3899add1 kvm: selftests: add basic test for state save and restore
The test calls KVM_RUN repeatedly, and creates an entirely new VM with the
old memory and vCPU state on every exit to userspace.  The kvm_util API is
expanded with two functions that manage the lifetime of a kvm_vm struct:
the first closes the file descriptors and leaves the memory allocated,
and the second opens the file descriptors and reuses the memory from
the previous incarnation of the kvm_vm struct.

For now the test is very basic, as it does not test for example XSAVE or
vCPU events.  However, it will test nested virtualization state starting
with the next patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-06 17:32:04 +02:00
..
include kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
lib kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
.gitignore kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
cr4_cpuid_sync_test.c kvm: selftests: add cr4_cpuid_sync_test 2018-08-06 17:31:59 +02:00
Makefile kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
set_sregs_test.c
state_test.c kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
sync_regs_test.c KVM: selftests: exit with 0 status code when tests cannot be run 2018-05-11 11:21:12 +02:00
vmx_tsc_adjust_test.c kvm: selftests: actually use all of lib/vmx.c 2018-08-06 17:32:03 +02:00