]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KVM: nVMX: Capture VM-Fail via CC_{SET,OUT} in nested early checks
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 25 Jan 2019 15:40:59 +0000 (07:40 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Feb 2019 12:12:20 +0000 (13:12 +0100)
...to take advantage of __GCC_ASM_FLAG_OUTPUTS__ when possible.

Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c

index bfacf90294669f723970554e5050f391952b1bdf..67f8fdf568eb8463567861172ca454167d73382a 100644 (file)
@@ -2768,12 +2768,12 @@ static int nested_vmx_check_vmentry_hw(struct kvm_vcpu *vcpu)
                 * VMLAUNCH and VMRESUME clear RFLAGS.{CF,ZF} on VM-Exit, set
                 * RFLAGS.CF on VM-Fail Invalid and set RFLAGS.ZF on VM-Fail
                 * Valid.  vmx_vmenter() directly "returns" RFLAGS, and so the
-                * results of VM-Enter is captured via SETBE to vm_fail.
+                * results of VM-Enter is captured via CC_{SET,OUT} to vm_fail.
                 */
                "call vmx_vmenter\n\t"
 
-               "setbe %[fail]\n\t"
-             : ASM_CALL_CONSTRAINT, [fail]"=qm"(vm_fail)
+               CC_SET(be)
+             : ASM_CALL_CONSTRAINT, CC_OUT(be) (vm_fail)
              : "c"(vmx), "d"((unsigned long)HOST_RSP),
                [launched]"i"(offsetof(struct vcpu_vmx, __launched)),
                [host_rsp]"i"(offsetof(struct vcpu_vmx, host_rsp)),