Commit 2a31339a authored by Jan Kiszka's avatar Jan Kiszka Committed by Avi Kivity

KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages

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: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent d7a79b6c
...@@ -705,14 +705,12 @@ int __kvm_set_memory_region(struct kvm *kvm, ...@@ -705,14 +705,12 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (r) if (r)
goto out_free; goto out_free;
#ifdef CONFIG_DMAR
/* map the pages in iommu page table */ /* map the pages in iommu page table */
if (npages) { if (npages) {
r = kvm_iommu_map_pages(kvm, &new); r = kvm_iommu_map_pages(kvm, &new);
if (r) if (r)
goto out_free; goto out_free;
} }
#endif
r = -ENOMEM; r = -ENOMEM;
slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL); slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
......
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