]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Capture VM-Fail to a local var in nested_vmx_check_vmentry_hw()
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 25 Jan 2019 15:40:58 +0000 (07:40 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Feb 2019 12:12:19 +0000 (13:12 +0100)
commit9197969f23777f21c71be9b2eeb84545a4b610b0
treec168e8cc8b0ed6f100f9f2d2ad9a32fda965ee0e
parent0075ac437558af26ae6aa62424f2a6b2165f015f
KVM: nVMX: Capture VM-Fail to a local var in nested_vmx_check_vmentry_hw()

Unlike the primary vCPU-run flow, the nested early checks code doesn't
actually want to propagate VM-Fail back to 'vmx'.  Yay copy+paste.

In additional to eliminating the need to clear vmx->fail before
returning, using a local boolean also drops a reference to 'vmx' in the
asm blob.  Dropping the reference to 'vmx' will save a register in the
long run as future patches will shift all pointer references from 'vmx'
to 'vmx->loaded_vmcs'.

Fixes: 62c2f27e6b47 ("KVM: nVMX: add option to perform early consistency checks via H/W")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c