diff mbox series

[29/29] KVM: VMX: Reorder clearing of registers in the vCPU-run assembly flow

Message ID 20190118212037.24412-30-sean.j.christopherson@intel.com
State New, archived
Headers show
Series KVM: VMX: Move vCPU-run to proper asm sub-routine | expand

Commit Message

Sean Christopherson Jan. 18, 2019, 9:20 p.m. UTC
Move the clearing of the common registers (not 64-bit-only) to the start
of the flow that clears volatile 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 functioncal change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
 arch/x86/kvm/vmx/vmenter.S | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series


diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
index 28c9034773b8..5c66744863ef 100644
--- a/arch/x86/kvm/vmx/vmenter.S
+++ b/arch/x86/kvm/vmx/vmenter.S
@@ -183,17 +183,16 @@  ENTRY(__vmx_vcpu_run)
 	 * Clear registers that contain guest values and will not be
 	 * restored to prevent speculative use of the guest's values.
+1:	xor %ecx, %ecx
+	xor %edx, %edx
+	xor %esi, %esi
+	xor %edi, %edi
 #ifdef CONFIG_X86_64
 	xor %r8d,  %r8d
 	xor %r9d,  %r9d
 	xor %r10d, %r10d
 	xor %r11d, %r11d
-	xor %ecx, %ecx
-	xor %edx, %edx
-	xor %esi, %esi
-	xor %edi, %edi
 	/* "POP" @regs. */
 	add $WORD_SIZE, %_ASM_SP