提交 b92b4fb5 编写于 作者: G Gary R Hook 提交者: Alex Williamson

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: NGary R Hook <gary.hook@amd.com>
Fixes: 8d54d6c8 ('iommu/amd: Implement apply_dm_region call-back')
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
上级 049541e1
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册