mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
iommu/amd: Limit the IOVA page range to the specified addresses
The extent of pages specified when applying a reserved region should
include up to the last page of the range, but not the page following
the range.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Fixes: 8d54d6c8b8
('iommu/amd: Implement apply_dm_region call-back')
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
049541e178
commit
b92b4fb5c1
1 changed files with 1 additions and 1 deletions
|
@ -3151,7 +3151,7 @@ static void amd_iommu_apply_resv_region(struct device *dev,
|
|||
unsigned long start, end;
|
||||
|
||||
start = IOVA_PFN(region->start);
|
||||
end = IOVA_PFN(region->start + region->length);
|
||||
end = IOVA_PFN(region->start + region->length - 1);
|
||||
|
||||
WARN_ON_ONCE(reserve_iova(&dma_dom->iovad, start, end) == NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue