KVM: VMX: Use vmread_error() to report VM-Fail in "goto" path
authorSean Christopherson <seanjc@google.com>
Fri, 21 Jul 2023 23:56:37 +0000 (16:56 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 29 Jul 2023 15:05:26 +0000 (11:05 -0400)
Use vmread_error() to report VM-Fail on VMREAD for the "asm goto" case,
now that trampoline case has yet another wrapper around vmread_error() to
play nice with instrumentation.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230721235637.2345403-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx_ops.h

index 5fa7477..33af7b4 100644 (file)
@@ -108,8 +108,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field)
 
 do_fail:
        instrumentation_begin();
-       WARN_ONCE(1, KBUILD_MODNAME ": vmread failed: field=%lx\n", field);
-       pr_warn_ratelimited(KBUILD_MODNAME ": vmread failed: field=%lx\n", field);
+       vmread_error(field);
        instrumentation_end();
        return 0;