]> www.infradead.org Git - users/dwmw2/linux.git/commit
iommu/vt-d: Fix identity map bounds in si_domain_init()
authorJon Pan-Doh <pandoh@google.com>
Tue, 9 Jul 2024 23:49:13 +0000 (16:49 -0700)
committerWill Deacon <will@kernel.org>
Fri, 12 Jul 2024 15:23:19 +0000 (16:23 +0100)
commit31000732d56b43765d51e08cccb68818fbc0032c
tree81a68a7a3f9e448fc03e1316841ddd9aff144919
parent0a3f6b3463014b03f6ad10eacc4d1d9af75d54a1
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 <pandoh@google.com>
Tested-by: Sudheer Dantuluri <dantuluris@google.com>
Suggested-by: Gary Zibrat <gzibrat@google.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240709234913.2749386-1-pandoh@google.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/intel/iommu.c