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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 arch/x86/kvm/vmx/vmenter.S | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
index 66dfbe618c9a..038c65bd5d95 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:
+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
 #endif
-	xor %ecx, %ecx
-	xor %edx, %edx
-	xor %esi, %esi
-	xor %edi, %edi
 
 	/* "POP" @regs. */
 	add $WORD_SIZE, %_ASM_SP
-- 
2.20.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux