diff options
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/iommu/intel_gas.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/x86/iommu/intel_gas.c b/sys/x86/iommu/intel_gas.c index 5ccf34b..2049744 100644 --- a/sys/x86/iommu/intel_gas.c +++ b/sys/x86/iommu/intel_gas.c @@ -327,13 +327,15 @@ dmar_gas_match_one(struct dmar_gas_match_args *a, struct dmar_map_entry *prev, start = roundup2(bs, a->common->alignment); /* DMAR_PAGE_SIZE to create gap after new entry. */ if (start + a->size + DMAR_PAGE_SIZE <= prev->end + prev->free_after && - start + a->size <= end) { + start + a->size <= end && dmar_test_boundary(start, a->size, + a->common->boundary)) { a->entry->start = start; return (true); } /* - * Not enough space to align at boundary, but allowed to split. + * Not enough space to align at the requested boundary, or + * boundary is smaller than the size, but allowed to split. * We already checked that start + size does not overlap end. * * XXXKIB. It is possible that bs is exactly at the start of |