Skip to content

Commit

Permalink
KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
jan-kiszka authored and avikivity committed Oct 24, 2010
1 parent d7a79b6 commit 2a31339
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,14 +705,12 @@ int __kvm_set_memory_region(struct kvm *kvm,
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);
Expand Down

0 comments on commit 2a31339

Please sign in to comment.