Skip to content

Commit 917401f

Browse files
Maxim Levitskybonzini
authored andcommitted
KVM: x86: nSVM: leave nested mode on vCPU free
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>
1 parent d72cf8f commit 917401f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,7 @@ static void svm_vcpu_free(struct kvm_vcpu *vcpu)
14381438
*/
14391439
svm_clear_current_vmcb(svm->vmcb);
14401440

1441+
svm_leave_nested(vcpu);
14411442
svm_free_nested(svm);
14421443

14431444
sev_free_vcpu(vcpu);

0 commit comments

Comments
 (0)