KVM: x86: nSVM/nVMX: set nested_run_pending on VM entry which is a result of RSM
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 7 Feb 2022 15:54:21 +0000 (17:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:08 +0000 (12:03 +0100)
commitcd14c7342df5fadde692edb414b971fd4f6c4df4
treeb636109a088f441c3ddaa3033a6c3d15909f5b6f
parentb5c86e7503883e3d535715ba4cc60f1e81be0ee7
KVM: x86: nSVM/nVMX: set nested_run_pending on VM entry which is a result of RSM

commit 759cbd59674a6c0aec616a3f4f0740ebd3f5fbef upstream.

While RSM induced VM entries are not full VM entries,
they still need to be followed by actual VM entry to complete it,
unlike setting the nested state.

This patch fixes boot of hyperv and SMM enabled
windows VM running nested on KVM, which fail due
to this issue combined with lack of dirty bit setting.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Cc: stable@vger.kernel.org
Message-Id: <20220207155447.840194-5-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c