HomeFreeBSD

dev/iommu: Include offset in maxaddr check.

Description

dev/iommu: Include offset in maxaddr check.

If iommu_gas_match_one has to adjust for a boundary crossing, its
check against maxaddr includes 'offset' in its calculation, to ensure
that the allocated memory does not exceed the max address. However, if
there's no boundary crossing adjustment, then the maxaddr check
disregards 'offset'. Fix that.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D34978

(cherry picked from commit 11fced21ccea1b80327d159a4c27046cb1f46952)

Details

Provenance
dougmAuthored on Apr 20 2022, 10:24 PM
Reviewer
kib
Differential Revision
D34978: Respect maxaddr limit with nonzero offset in iommu_gas_match_one
Parents
rGb7bd54e4ec5b: x86/iommu: Shrink the critical section in dmar_qi_task()
Branches
Unknown
Tags
Unknown