KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobs
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 20 Dec 2018 20:25:16 +0000 (12:25 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Dec 2018 11:02:43 +0000 (12:02 +0100)
commit051a2d3e59e51ae49fd56aef34e472832897ce46
treea6c583cfe78711a8d9e579f1e1861a20725c640b
parentc6ad45973380af5ef43b708a54d7475d93f86638
KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobs

Use '%% " _ASM_CX"' instead of '%0' to dereference RCX, i.e. the
'struct vcpu_vmx' pointer, in the VM-Enter asm blobs of vmx_vcpu_run()
and nested_vmx_check_vmentry_hw().  Using the symbolic name means that
adding/removing an output parameter(s) requires "rewriting" almost all
of the asm blob, which makes it nearly impossible to understand what's
being changed in even the most minor patches.

Opportunistically improve the code comments.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c