diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2019-07-21 13:52:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-28 08:29:30 +0200 |
commit | 7560e33369ed30ab68180dcd6b8ef342bbb3c29a (patch) | |
tree | 091dc160af2155353c80807f5637e5f8bae7854f /arch | |
parent | 967bc679c596ebf41afbb5c9ffc4216354428b6f (diff) | |
download | linux-stable-7560e33369ed30ab68180dcd6b8ef342bbb3c29a.tar.gz linux-stable-7560e33369ed30ab68180dcd6b8ef342bbb3c29a.tar.bz2 linux-stable-7560e33369ed30ab68180dcd6b8ef342bbb3c29a.zip |
KVM: nVMX: Clear pending KVM_REQ_GET_VMCS12_PAGES when leaving nested
commit cf64527bb33f6cec2ed50f89182fc4688d0056b6 upstream.
Letting this pend may cause nested_get_vmcs12_pages to run against an
invalid state, corrupting the effective vmcs of L1.
This was triggerable in QEMU after a guest corruption in L2, followed by
a L1 reset.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Cc: stable@vger.kernel.org
Fixes: 7f7f1ba33cf2 ("KVM: x86: do not load vmcs12 pages while still in SMM")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 880bc36a0d5d..4cf16378dffe 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8490,6 +8490,8 @@ static void free_nested(struct vcpu_vmx *vmx) if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon) return; + kvm_clear_request(KVM_REQ_GET_VMCS12_PAGES, &vmx->vcpu); + hrtimer_cancel(&vmx->nested.preemption_timer); vmx->nested.vmxon = false; vmx->nested.smm.vmxon = false; |