Commit c761159c authored by Peter Xu's avatar Peter Xu Committed by Paolo Bonzini

KVM: x86: use pic/ioapic destructor when destroy vm

We have specific destructors for pic/ioapic, we'd better use them when
destroying the VM as well.
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 950712eb
......@@ -8153,8 +8153,8 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
if (kvm_x86_ops->vm_destroy)
kvm_x86_ops->vm_destroy(kvm);
kvm_iommu_unmap_guest(kvm);
kfree(kvm->arch.vpic);
kfree(kvm->arch.vioapic);
kvm_pic_destroy(kvm);
kvm_ioapic_destroy(kvm);
kvm_free_vcpus(kvm);
kvfree(rcu_dereference_check(kvm->arch.apic_map, 1));
kvm_mmu_uninit_vm(kvm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment