]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Return the correct dma mask when we are bypassing the IOMMU
authorArvind Sankar <nivedita@alum.mit.edu>
Tue, 8 Oct 2019 14:33:57 +0000 (10:33 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 18 Oct 2019 15:19:20 +0000 (17:19 +0200)
commit3a7f8f3ea69d80761e7363b878068905aacb8445
treec7308459daee66e24068e6b1bd9e685553e36dd9
parent4e6adf4bf549f920aec0e34aa63675a8a23ff702
iommu/vt-d: Return the correct dma mask when we are bypassing the IOMMU

We must return a mask covering the full physical RAM when bypassing the
IOMMU mapping. Also, in iommu_need_mapping, we need to check using
dma_direct_get_required_mask to ensure that the device's dma_mask can
cover physical RAM before deciding to bypass IOMMU mapping.

Based on an earlier patch from Christoph Hellwig.

Fixes: a375c67d8159 ("dma-mapping: provide a better default ->get_required_mask")
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/iommu/intel-iommu.c