KVM: Simplify coalesced mmio initialization
[deliverable/linux.git] / virt / kvm / kvm_main.c
index c10d117c43173c8d33269563804f23547bda6d97..bc23b8e0609b58c5e71f47ca6ced85131763a6ae 100644 (file)
@@ -51,9 +51,7 @@
 #include <asm/pgtable.h>
 #include <asm-generic/bitops/le.h>
 
-#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
 #include "coalesced_mmio.h"
-#endif
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/kvm.h>
@@ -468,10 +466,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
        kvm_free_irq_routing(kvm);
        kvm_io_bus_destroy(&kvm->pio_bus);
        kvm_io_bus_destroy(&kvm->mmio_bus);
-#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
-       if (kvm->coalesced_mmio_ring != NULL)
-               free_page((unsigned long)kvm->coalesced_mmio_ring);
-#endif
+       kvm_coalesced_mmio_free(kvm);
 #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
        mmu_notifier_unregister(&kvm->mmu_notifier, kvm->mm);
 #else
This page took 0.029546 seconds and 5 git commands to generate.