summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx/vmenter.S
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-01-25 18:41:16 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-02-21 00:48:16 +0300
commit77df549559dbe7f265ab19bd444d6acb3a718b4d (patch)
tree2590a06f5c72f6d4f6dc4fdbd6686c07c6a11771 /arch/x86/kvm/vmx/vmenter.S
parenta62fd5a76c99dd96c74c6638408961b7ff3c71c4 (diff)
downloadlinux-77df549559dbe7f265ab19bd444d6acb3a718b4d.tar.xz
KVM: VMX: Pass @launched to the vCPU-run asm via standard ABI regs
...to prepare for making the sub-routine callable from C code. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmenter.S')
-rw-r--r--arch/x86/kvm/vmx/vmenter.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
index 7d8b09abcdec..a3d9a8e062f9 100644
--- a/arch/x86/kvm/vmx/vmenter.S
+++ b/arch/x86/kvm/vmx/vmenter.S
@@ -84,7 +84,7 @@ ENDPROC(vmx_vmexit)
* __vmx_vcpu_run - Run a vCPU via a transition to VMX guest mode
* @vmx: struct vcpu_vmx *
* @regs: unsigned long * (to guest registers)
- * %RBX: VMCS launched status (non-zero indicates already launched)
+ * @launched: %true if the VMCS has been launched
*
* Returns:
* %RBX is 0 on VM-Exit, 1 on VM-Fail
@@ -99,6 +99,9 @@ ENTRY(__vmx_vcpu_run)
*/
push %_ASM_ARG2
+ /* Copy @launched to BL, _ASM_ARG3 is volatile. */
+ mov %_ASM_ARG3B, %bl
+
/* Adjust RSP to account for the CALL to vmx_vmenter(). */
lea -WORD_SIZE(%_ASM_SP), %_ASM_ARG2
call vmx_update_host_rsp