summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx/vmx.c
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-01-25 07:41:16 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-02-20 22:48:16 +0100
commit77df549559dbe7f265ab19bd444d6acb3a718b4d (patch)
tree2590a06f5c72f6d4f6dc4fdbd6686c07c6a11771 /arch/x86/kvm/vmx/vmx.c
parenta62fd5a76c99dd96c74c6638408961b7ff3c71c4 (diff)
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/vmx.c')
-rw-r--r--arch/x86/kvm/vmx/vmx.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 8bc8f09eaf0c..1b73a82444a2 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6448,19 +6448,18 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu)
"call __vmx_vcpu_run \n\t"
: ASM_CALL_CONSTRAINT, "=b"(vmx->fail),
#ifdef CONFIG_X86_64
- "=D"((int){0}), "=S"((int){0})
- : "D"(vmx), "S"(&vcpu->arch.regs),
+ "=D"((int){0}), "=S"((int){0}), "=d"((int){0})
+ : "D"(vmx), "S"(&vcpu->arch.regs), "d"(vmx->loaded_vmcs->launched)
#else
- "=a"((int){0}), "=d"((int){0})
- : "a"(vmx), "d"(&vcpu->arch.regs),
+ "=a"((int){0}), "=d"((int){0}), "=c"((int){0})
+ : "a"(vmx), "d"(&vcpu->arch.regs), "c"(vmx->loaded_vmcs->launched)
#endif
- "b"(vmx->loaded_vmcs->launched)
: "cc", "memory"
#ifdef CONFIG_X86_64
- , "rax", "rcx", "rdx"
+ , "rax", "rcx"
, "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
#else
- , "ecx", "edi", "esi"
+ , "edi", "esi"
#endif
);