]> www.infradead.org Git - users/willy/xarray.git/commit
KVM: nVMX: Release eVMCS when enlightened VMENTRY was disabled
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 26 May 2021 13:20:18 +0000 (15:20 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:48 +0000 (13:09 -0400)
commit02761716801dbc99d977bb281de7c1052405c9f5
tree965a13116e576ba354d782e336d8fdaad40d3e7d
parent6a789ca5d5038a60f51c374067fd9abab13df596
KVM: nVMX: Release eVMCS when enlightened VMENTRY was disabled

In theory, L1 can try to disable enlightened VMENTRY in VP assist page and
try to issue VMLAUNCH/VMRESUME. While nested_vmx_handle_enlightened_vmptrld()
properly handles this as 'EVMPTRLD_DISABLED', previously mapped eVMCS
remains mapped and thus all evmptr_is_valid() checks will still pass and
nested_vmx_run() will proceed when it shouldn't.

Release eVMCS immediately when we detect that enlightened vmentry was
disabled by L1.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210526132026.270394-4-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c