KVM/VMX: Use TEST %REG,%REG instead of CMP $0,%REG in vmenter.S
PATCH 1/1 KVM/VMX: Use TEST %REG,%REG instead of CMP $0,%REG in vmenter.S
Saves one byte in __vmx_vcpu_run for the same functionality.
Cc Paolo Bonzini <[email protected]>
Cc Sean Christopherson <[email protected]>
Signed-off-by Uros Bizjak <[email protected]>
--- arch/x86/kvm/vmx/vmenter.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmenter.S +1 -1
@@ -132,7 +132,7 @@ SYM_FUNC_START(__vmx_vcpu_run) mov (%_ASM_SP), %_ASM_AX /* Check if vmlaunch or vmresume is needed */ - cmpb $0, %bl + testb %bl, %bl /* Load guest registers. Don't clobber flags. */ mov VCPU_RCX(%_ASM_AX), %_ASM_CX
Signature · 1 line
2.26.2
Quoted 15 lines · Uros Bizjak
Saves one byte in
__vmx_vcpu_runfor the same functionality.Cc Paolo Bonzini <[email protected]>Cc Sean Christopherson <[email protected]>Signed-off-by Uros Bizjak <[email protected]>--- arch/x86/kvm/vmx/vmenter.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kvm/vmx/vmenter.S +0
-0
arch/x86/kvm/vmx/vmenter.S SYM_FUNC_START(__vmx_vcpu_run) · line 138
Quoted 8 lines
arch/x86/kvm/vmx/vmenter.S +1
-1@@ -132,7 +132,7 @@ SYM_FUNC_START(__vmx_vcpu_run) mov (%_ASM_SP), %_ASM_AX /* Check if vmlaunch or vmresume is needed */ - cmpb $0, %bl + testb %bl, %bl /* Load guest registers. Don't clobber flags. */ mov VCPU_RCX(%_ASM_AX), %_ASM_CX
Queued, thanks. This was mistakenly marked as read, so I thought I had already applied it.
Paolo