This is a note to let you know that I've just added the patch titled KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-nvmx-reload-vmcs01-if-getting-vmcs12-s-pages-fails.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b89d5ad00e789967a5e2c5335f75c48755bebd88 Mon Sep 17 00:00:00 2001 From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> Date: Wed, 23 Sep 2020 11:44:47 -0700 Subject: KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> commit b89d5ad00e789967a5e2c5335f75c48755bebd88 upstream. Reload vmcs01 when bailing from nested_vmx_enter_non_root_mode() as KVM expects vmcs01 to be loaded when is_guest_mode() is false. Fixes: 671ddc700fd08 ("KVM: nVMX: Don't leak L1 MMIO regions to L2") Cc: stable@xxxxxxxxxxxxxxx Cc: Dan Cross <dcross@xxxxxxxxxx> Cc: Jim Mattson <jmattson@xxxxxxxxxx> Cc: Peter Shier <pshier@xxxxxxxxxx> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> Message-Id: <20200923184452.980-3-sean.j.christopherson@xxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/kvm/vmx/nested.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -3096,8 +3096,10 @@ enum nvmx_vmentry_status nested_vmx_ente prepare_vmcs02_early(vmx, vmcs12); if (from_vmentry) { - if (unlikely(!nested_get_vmcs12_pages(vcpu))) + if (unlikely(!nested_get_vmcs12_pages(vcpu))) { + vmx_switch_vmcs(vcpu, &vmx->vmcs01); return NVMX_VMENTRY_KVM_INTERNAL_ERROR; + } if (nested_vmx_check_vmentry_hw(vcpu)) { vmx_switch_vmcs(vcpu, &vmx->vmcs01); Patches currently in stable-queue which might be from sean.j.christopherson@xxxxxxxxx are queue-5.4/kvm-x86-mmu-commit-zap-of-remaining-invalid-pages-when-recovering-lpages.patch queue-5.4/kvm-nvmx-reload-vmcs01-if-getting-vmcs12-s-pages-fails.patch queue-5.4/kvm-nvmx-reset-the-segment-cache-when-stuffing-guest-segs.patch