aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/x86.h
AgeCommit message (Collapse)AuthorFilesLines
2018-10-17kvm: selftests: move arch-specific files to arch-specific locationsAndrew Jones1-1047/+0
Signed-off-by: Andrew Jones <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
2018-08-06kvm: selftests: add basic test for state save and restorePaolo Bonzini1-0/+4
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 <[email protected]>
2018-08-06kvm: selftests: create a GDT and TSSPaolo Bonzini1-2/+2
The GDT and the TSS base were left to zero, and this has interesting effects when the TSS descriptor is later read to set up a VMCS's TR_BASE. Basically it worked by chance, and this patch fixes it by setting up all the protected mode data structures properly. Because the GDT and TSS addresses are virtual, the page tables now always exist at the time of vcpu setup. Signed-off-by: Paolo Bonzini <[email protected]>
2018-04-04kvm: selftests: add API testing infrastructurePaolo Bonzini1-0/+1043
Testsuite contributed by Google and cleaned up by myself for inclusion in Linux. Signed-off-by: Ken Hofsass <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>