]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: VMX: Reorder clearing of registers in the vCPU-run assembly flow
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 25 Jan 2019 15:41:20 +0000 (07:41 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Feb 2019 21:48:18 +0000 (22:48 +0100)
Move the clearing of the common registers (not 64-bit-only) to the start
of the flow that clears registers holding guest state.  This is
purely a cosmetic change so that the label doesn't point at a blank line
and a #define.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmenter.S

index d325f1d6110b53b58c403eb73d194799a80f67ed..7b272738c5768bac029ca3e4f3e6d7b1003260da 100644 (file)
@@ -185,7 +185,12 @@ ENTRY(__vmx_vcpu_run)
         * free.  RSP and RAX are exempt as RSP is restored by hardware during
         * VM-Exit and RAX is explicitly loaded with 0 or 1 to return VM-Fail.
         */
-1:
+1:     xor %ebx, %ebx
+       xor %ecx, %ecx
+       xor %edx, %edx
+       xor %esi, %esi
+       xor %edi, %edi
+       xor %ebp, %ebp
 #ifdef CONFIG_X86_64
        xor %r8d,  %r8d
        xor %r9d,  %r9d
@@ -196,12 +201,6 @@ ENTRY(__vmx_vcpu_run)
        xor %r14d, %r14d
        xor %r15d, %r15d
 #endif
-       xor %ebx, %ebx
-       xor %ecx, %ecx
-       xor %edx, %edx
-       xor %esi, %esi
-       xor %edi, %edi
-       xor %ebp, %ebp
 
        /* "POP" @regs. */
        add $WORD_SIZE, %_ASM_SP