KVM: nVMX: Validate the EPTP when emulating INVEPT(EXTENT_CONTEXT)
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 20 Mar 2020 21:27:58 +0000 (14:27 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Apr 2020 16:08:48 +0000 (12:08 -0400)
commiteed0030e4caa941cfbdfca00981395d85e6b3c3e
tree2741b7059c75e3e5956319c4f6c0ec32807b6c6c
parente8eff282154fc392dadf6a779009c7ecaa7e169b
KVM: nVMX: Validate the EPTP when emulating INVEPT(EXTENT_CONTEXT)

Signal VM-Fail for the single-context variant of INVEPT if the specified
EPTP is invalid.  Per the INEVPT pseudocode in Intel's SDM, it's subject
to the standard EPT checks:

  If VM entry with the "enable EPT" VM execution control set to 1 would
  fail due to the EPTP value then VMfail(Invalid operand to INVEPT/INVVPID);

Fixes: bfd0a56b90005 ("nEPT: Nested INVEPT")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200320212833.3507-3-sean.j.christopherson@intel.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c