diff options
author | Peter Xu <peterx@redhat.com> | 2017-03-15 04:01:19 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-23 14:02:06 -0400 |
commit | c761159cf81b8641290f7559a8d8e30f6ab92669 (patch) | |
tree | 6d4fcc4c75d17e5252d68e8c238235918178cd9a | |
parent | 950712eb8ef03e4a62ac5b3067efde7ec2f8a91e (diff) |
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: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1faf620a6fdc..d30ff491ecc7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -8153,8 +8153,8 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
8153 | if (kvm_x86_ops->vm_destroy) | 8153 | if (kvm_x86_ops->vm_destroy) |
8154 | kvm_x86_ops->vm_destroy(kvm); | 8154 | kvm_x86_ops->vm_destroy(kvm); |
8155 | kvm_iommu_unmap_guest(kvm); | 8155 | kvm_iommu_unmap_guest(kvm); |
8156 | kfree(kvm->arch.vpic); | 8156 | kvm_pic_destroy(kvm); |
8157 | kfree(kvm->arch.vioapic); | 8157 | kvm_ioapic_destroy(kvm); |
8158 | kvm_free_vcpus(kvm); | 8158 | kvm_free_vcpus(kvm); |
8159 | kvfree(rcu_dereference_check(kvm->arch.apic_map, 1)); | 8159 | kvfree(rcu_dereference_check(kvm->arch.apic_map, 1)); |
8160 | kvm_mmu_uninit_vm(kvm); | 8160 | kvm_mmu_uninit_vm(kvm); |