KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 18 Oct 2010 13:38:40 +0000 (15:38 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:53:15 +0000 (10:53 +0200)
We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
if CONFIG_IOMMU_API is not defined.

KVM-Stable-Tag.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c

index 1aeeb7fbe2ef33952bc1be9109a8254bb34de7ad..ac326de43ce4215653391cc0901dca1791342205 100644 (file)
@@ -705,14 +705,12 @@ skip_lpage:
        if (r)
                goto out_free;
 
-#ifdef CONFIG_DMAR
        /* map the pages in iommu page table */
        if (npages) {
                r = kvm_iommu_map_pages(kvm, &new);
                if (r)
                        goto out_free;
        }
-#endif
 
        r = -ENOMEM;
        slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);