KVM: x86: nSVM: leave nested mode on vCPU free
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 3 Nov 2022 14:13:43 +0000 (16:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2022 16:41:09 +0000 (17:41 +0100)
commitf42ebf972a9f0c26e564809b15eb77cb70d2aa38
treec57dea8bf64c38530ee34b638c21f45da7f04800
parent7b3c9405b2729ce70ac6826575d1559cb5ac4725
KVM: x86: nSVM: leave nested mode on vCPU free

commit 917401f26a6af5756d89b550a8e1bd50cf42b07e upstream.

If the VM was terminated while nested, we free the nested state
while the vCPU still is in nested mode.

Soon a warning will be added for this condition.

Cc: stable@vger.kernel.org
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20221103141351.50662-2-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