aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/dma-iommu.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-04-04 15:47:22 -0500
committerJoerg Roedel <jroedel@suse.de>2022-04-28 10:26:49 +0200
commit121660bba631104154b7c15e88f208c48c8c3297 (patch)
treefeb6830cf26abee59c6e3a2ed4a4e34fde71ee91 /drivers/iommu/dma-iommu.c
parentLinux 5.18-rc4 (diff)
downloadlinux-dev-121660bba631104154b7c15e88f208c48c8c3297.tar.xz
linux-dev-121660bba631104154b7c15e88f208c48c8c3297.zip
iommu/amd: Enable swiotlb in all cases
Previously the AMD IOMMU would only enable SWIOTLB in certain circumstances: * IOMMU in passthrough mode * SME enabled This logic however doesn't work when an untrusted device is plugged in that doesn't do page aligned DMA transactions. The expectation is that a bounce buffer is used for those transactions. This fails like this: swiotlb buffer is full (sz: 4096 bytes), total 0 (slots), used 0 (slots) That happens because the bounce buffers have been allocated, followed by freed during startup but the bounce buffering code expects that all IOMMUs have left it enabled. Remove the criteria to set up bounce buffers on AMD systems to ensure they're always available for supporting untrusted devices. Fixes: 82612d66d51d ("iommu: Allow the dma-iommu api to use bounce buffers") Suggested-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220404204723.9767-2-mario.limonciello@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/dma-iommu.c')
0 files changed, 0 insertions, 0 deletions