]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5b96b5abb0056d595383fe3da643c97f654aaab4
treea6c583cfe78711a8d9e579f1e1861a20725c640b
parent4a732ad00337f4709cadd4ab015c6aa5dca88ad2
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