public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vmx: use mov instead of lea in __vmx_vcpu_run()
@ 2022-11-17 20:36 Alexey Dobriyan
  2022-11-18  0:20 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2022-11-17 20:36 UTC (permalink / raw)
  To: pbonzini; +Cc: kvm, adobriyan

"mov rsi, rsp" is equivalent to "lea rsi, [rsp]" but 1 byte shorter.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/x86/kvm/vmx/vmenter.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/vmx/vmenter.S
+++ b/arch/x86/kvm/vmx/vmenter.S
@@ -72,7 +72,7 @@ SYM_FUNC_START(__vmx_vcpu_run)
 	/* Copy @flags to BL, _ASM_ARG3 is volatile. */
 	mov %_ASM_ARG3B, %bl
 
-	lea (%_ASM_SP), %_ASM_ARG2
+	mov %_ASM_SP, %_ASM_ARG2
 	call vmx_update_host_rsp
 
 	ALTERNATIVE "jmp .Lspec_ctrl_done", "", X86_FEATURE_MSR_SPEC_CTRL

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-18  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-17 20:36 [PATCH] vmx: use mov instead of lea in __vmx_vcpu_run() Alexey Dobriyan
2022-11-18  0:20 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox