kvm: selftests: actually use all of lib/vmx.c
The allocation of the VMXON and VMCS is currently done twice, in
lib/vmx.c and in vmx_tsc_adjust_test.c. Reorganize the code to
provide a cleaner and easier to use API to the tests. lib/vmx.c
now does the complete setup of the VMX data structures, but does not
create the VM or set CPUID. This has to be done by the caller.
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- tools/testing/selftests/kvm/include/vmx.h 17 additions, 4 deletionstools/testing/selftests/kvm/include/vmx.h
- tools/testing/selftests/kvm/lib/vmx.c 42 additions, 29 deletionstools/testing/selftests/kvm/lib/vmx.c
- tools/testing/selftests/kvm/vmx_tsc_adjust_test.c 13 additions, 56 deletionstools/testing/selftests/kvm/vmx_tsc_adjust_test.c
Loading
Please register or sign in to comment