mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
iommu_gas_map_region(): add comment explaining the ma array shift
(cherry picked from commit 45f70f98fc55b753b1e7a7374b4a061aa1f27392)
This commit is contained in:
parent
f034ddd2fa
commit
b01d15abba
1 changed files with 5 additions and 0 deletions
|
|
@ -875,6 +875,11 @@ iommu_gas_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry,
|
|||
if (entry->end == entry->start)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* iommu_gas_alloc_region() might clipped the entry start and
|
||||
* end positions. Adjust the beginning of the ma array to map
|
||||
* the pages at the requested relative positions.
|
||||
*/
|
||||
error = domain->ops->map(domain, entry,
|
||||
ma + OFF_TO_IDX(start - entry->start), eflags,
|
||||
((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0));
|
||||
|
|
|
|||
Loading…
Reference in a new issue