diff -ru8 original//vmmon-only/linux/iommu.c patched//vmmon-only/linux/iommu.c --- original//vmmon-only/linux/iommu.c 2010-05-21 02:45:24.000000000 -0400 +++ patched//vmmon-only/linux/iommu.c 2010-06-16 10:39:09.000000000 -0400 @@ -148,17 +148,17 @@ printk(KERN_ERR "%s: the physical page number 0x%x is not valid.\n", __func__, mpn); status = -EINVAL; goto out; } map_to = PPN_2_PA(mpn); map_prot = IOMMU_READ | IOMMU_WRITE; } - if ((status = iommu_map_range(vmLinux->iommuDomain, + if ((status = iommu_map(vmLinux->iommuDomain, PPN_2_PA(ppn), map_to, PAGE_SIZE, map_prot))) { printk(KERN_ERR "%s: IOMMU Mapping of PPN 0x%x -> MPN 0x%x " "could not be established.\n", __func__, ppn, mpn); goto out; } } printk(KERN_DEBUG "%s: IOMMU domain is created.\n", __func__); @@ -395,17 +395,17 @@ list_del(&passthruDevice->list); IOMMUUnregisterDeviceInt(passthruDevice); } } spin_unlock(&passthruDeviceListLock); /* Relinquish the IOMMU domain used by this VM. */ for (ppn = 0; ppn < vmLinux->numPages; ppn++) { - iommu_unmap_range(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE); + iommu_unmap(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE); } if (vmLinux->iommuDomain) { iommu_domain_free(vmLinux->iommuDomain); vmLinux->iommuDomain = NULL; printk(KERN_INFO "%s: IOMMU domain is destroyed.\n", __func__); } }