Skip to content
Commit 159193e8 authored by Robin Murphy's avatar Robin Murphy
Browse files

iommu/dma: Fix domain init



Despite carefully rewording the kerneldoc to describe the new direct
interaction with dma_range_map, it seems I managed to confuse myself in
removing the redundant force_aperture check and ended up making the code
not do that at all. This led to dma_range_maps inadvertently being able
to set iovad->start_pfn = 0, and all the nonsensical chaos which ensues
from there. Restore the correct behaviour of constraining base_pfn to
the domain aperture regardless of dma_range_map, and not trying to apply
dma_range_map constraints to the basic IOVA domain since they will be
properly handled with reserved regions later.

Reported-by: default avatarJon Hunter <jonathanh@nvidia.com>
Reported-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Fixes: ad4750b0 ("iommu/dma: Make limit checks self-contained")
Tested-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Robin Murphy's avatarRobin Murphy <robin.murphy@arm.com>
parent 09a8340c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment