]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is enabled
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 15 Apr 2020 20:34:50 +0000 (13:34 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Apr 2020 13:13:06 +0000 (09:13 -0400)
commitb368f4471e6fe7035273c7f56486ba0ef5cb9aee
tree1fd2a3cae927158f857660b31856e3a9cbaab90f
parent8cc8fa880604cbe9bca008947b13b0b06a853ba8
KVM: nVMX: Invoke ept_save_pdptrs() if and only if PAE paging is enabled

Invoke ept_save_pdptrs() when restoring L1's host state on a "late"
VM-Fail if and only if PAE paging is enabled.  This saves a CALL in the
common case where L1 is a 64-bit host, and avoids incorrectly marking
the PDPTRs as dirty.

WARN if ept_save_pdptrs() is called with PAE disabled now that the
nested usage pre-checks is_pae_paging().  Barring a bug in KVM's MMU,
attempting to read the PDPTRs with PAE disabled is now impossible.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200415203454.8296-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c