Otherwise, the next test breaks with "vmxon failed".

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 x86/vmx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index 5bb5969..2d601cc 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -868,7 +868,7 @@ static int test_run(struct vmx_test *test)
        /* Directly call test->init is ok here, init_vmcs has done
           vmcs init, vmclear and vmptrld*/
        if (test->init && test->init(test->vmcs) != VMX_TEST_START)
-               return 0;
+               goto out;
        test->exits = 0;
        current = test;
        regs = test->guest_regs;
@@ -876,6 +876,7 @@ static int test_run(struct vmx_test *test)
        launched = 0;
        printf("\nTest suite: %s\n", test->name);
        vmx_run();
+out:
        if (vmx_off()) {
                printf("%s : vmxoff failed.\n", __func__);
                return 1;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to