diff options
author | Jon Pan-Doh <[email protected]> | 2024-07-09 16:49:13 -0700 |
---|---|---|
committer | Will Deacon <[email protected]> | 2024-07-12 16:23:19 +0100 |
commit | 31000732d56b43765d51e08cccb68818fbc0032c (patch) | |
tree | 81a68a7a3f9e448fc03e1316841ddd9aff144919 | |
parent | 0a3f6b3463014b03f6ad10eacc4d1d9af75d54a1 (diff) |
iommu/vt-d: Fix identity map bounds in si_domain_init()
Intel IOMMU operates on inclusive bounds (both generally aas well as
iommu_domain_identity_map()). Meanwhile, for_each_mem_pfn_range() uses
exclusive bounds for end_pfn. This creates an off-by-one error when
switching between the two.
Fixes: c5395d5c4a82 ("intel-iommu: Clean up iommu_domain_identity_map()")
Signed-off-by: Jon Pan-Doh <[email protected]>
Tested-by: Sudheer Dantuluri <[email protected]>
Suggested-by: Gary Zibrat <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
-rw-r--r-- | drivers/iommu/intel/iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 523407f6f6b2..3917279afca7 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -2041,7 +2041,7 @@ static int __init si_domain_init(int hw) for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) { ret = iommu_domain_identity_map(si_domain, mm_to_dma_pfn_start(start_pfn), - mm_to_dma_pfn_end(end_pfn)); + mm_to_dma_pfn_end(end_pfn-1)); if (ret) return ret; } |