]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: move vm_destroy callback at end of kvm_arch_destroy_vm
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 25 Feb 2025 18:01:41 +0000 (13:01 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Mar 2025 17:45:36 +0000 (13:45 -0400)
commit46c49372e10ea161beaa78936a64d2b49531dffb
tree0399e44695e155ac3dfe4f496afa983ce36e0704
parentea9bd29a9c0d757b3384ae3e633e6bbaddf00725
KVM: x86: move vm_destroy callback at end of kvm_arch_destroy_vm

TDX needs to free the TDR control structures last, after all paging structures
have been torn down; move the vm_destroy callback at a suitable place.
The new place is also okay for AMD; the main difference is that the
MMU has been torn down and, if anything, that is better done before
the SNP ASID is released.

Extracted from a patch by Yan Zhao.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c