diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-07-26 13:19:23 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-06 17:32:04 +0200 |
commit | fa3899add1056f209c5b61d0c60cec34775a6781 (patch) | |
tree | 4854009f8c106b8b88b7590aeb0b4aae73448a96 /tools/testing/selftests/kvm/Makefile | |
parent | kvm: selftests: ensure vcpu file is released (diff) | |
download | linux-fa3899add1056f209c5b61d0c60cec34775a6781.tar.xz linux-fa3899add1056f209c5b61d0c60cec34775a6781.zip |
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>
Diffstat (limited to 'tools/testing/selftests/kvm/Makefile')
-rw-r--r-- | tools/testing/selftests/kvm/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index 65bda4fb0ad6..dd0e5163f01f 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -10,6 +10,7 @@ TEST_GEN_PROGS_x86_64 = set_sregs_test TEST_GEN_PROGS_x86_64 += sync_regs_test TEST_GEN_PROGS_x86_64 += vmx_tsc_adjust_test TEST_GEN_PROGS_x86_64 += cr4_cpuid_sync_test +TEST_GEN_PROGS_x86_64 += state_test TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(UNAME_M)) LIBKVM += $(LIBKVM_$(UNAME_M)) |