projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d72cf8f
)
KVM: x86: nSVM: leave nested mode on vCPU free
author
Maxim Levitsky
<mlevitsk@redhat.com>
Thu, 3 Nov 2022 14:13:43 +0000
(16:13 +0200)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Thu, 17 Nov 2022 16:39:53 +0000
(11:39 -0500)
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>
arch/x86/kvm/svm/svm.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/svm/svm.c
b/arch/x86/kvm/svm/svm.c
index 9f88c8e6766e446a358ba77a14d428844cc59a73..098f04bec8ef3ad89bcbf0d33826477dc95d1cf9 100644
(file)
--- a/
arch/x86/kvm/svm/svm.c
+++ b/
arch/x86/kvm/svm/svm.c
@@
-1438,6
+1438,7
@@
static void svm_vcpu_free(struct kvm_vcpu *vcpu)
*/
svm_clear_current_vmcb(svm->vmcb);
+ svm_leave_nested(vcpu);
svm_free_nested(svm);
sev_free_vcpu(vcpu);