Index: sys/dev/iommu/iommu_gas.c =================================================================== --- sys/dev/iommu/iommu_gas.c +++ sys/dev/iommu/iommu_gas.c @@ -384,7 +384,7 @@ iommu_gas_match_insert(a); return (0); } - if (entry->free_down < a->size + a->offset + IOMMU_PAGE_SIZE) + if (entry->free_down < a->size + a->offset + 2 * IOMMU_PAGE_SIZE) return (ENOMEM); if (entry->first >= a->common->lowaddr) return (ENOMEM); @@ -408,7 +408,7 @@ { struct iommu_map_entry *child; - if (entry->free_down < a->size + a->offset + IOMMU_PAGE_SIZE) + if (entry->free_down < a->size + a->offset + 2 * IOMMU_PAGE_SIZE) return (ENOMEM); if (entry->last < a->common->highaddr) return (ENOMEM);