diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2018-10-16 18:50:08 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-10-17 00:30:18 +0200 |
commit | 1e7ecd1b3d21a6302f3ee4a3720f682eb2467a3c (patch) | |
tree | e25ed1e05c29d87a2404b48fe8bbc62f72415777 /tools/testing/selftests/kvm/lib | |
parent | x86/kvm/nVMX: allow bare VMXON state migration (diff) | |
download | linux-1e7ecd1b3d21a6302f3ee4a3720f682eb2467a3c.tar.xz linux-1e7ecd1b3d21a6302f3ee4a3720f682eb2467a3c.zip |
KVM: selftests: state_test: test bare VMXON migration
Split prepare_for_vmx_operation() into prepare_for_vmx_operation() and
load_vmcs() so we can inject GUEST_SYNC() in between.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib')
-rw-r--r-- | tools/testing/selftests/kvm/lib/x86_64/vmx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86_64/vmx.c b/tools/testing/selftests/kvm/lib/x86_64/vmx.c index d7c401472247..cc356da9b3d8 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/vmx.c +++ b/tools/testing/selftests/kvm/lib/x86_64/vmx.c @@ -107,6 +107,11 @@ bool prepare_for_vmx_operation(struct vmx_pages *vmx) if (vmxon(vmx->vmxon_gpa)) return false; + return true; +} + +bool load_vmcs(struct vmx_pages *vmx) +{ /* Load a VMCS. */ *(uint32_t *)(vmx->vmcs) = vmcs_revision(); if (vmclear(vmx->vmcs_gpa)) |