summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:35:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:35:38 +0000
commit4f8f1553146401921349e8e78962dff48cde846a (patch)
treebf5ef5abdf1ca1370eb3947d70a2c176b6b69edd /drivers/iommu/amd
parentAdding upstream version 6.8.9. (diff)
downloadlinux-4f8f1553146401921349e8e78962dff48cde846a.tar.xz
linux-4f8f1553146401921349e8e78962dff48cde846a.zip
Adding upstream version 6.8.11.upstream/6.8.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/iommu/amd')
-rw-r--r--drivers/iommu/amd/iommu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 4283dd819..f945bf325 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -2593,6 +2593,10 @@ static int amd_iommu_def_domain_type(struct device *dev)
if (!dev_data)
return 0;
+ /* Always use DMA domain for untrusted device */
+ if (dev_is_pci(dev) && to_pci_dev(dev)->untrusted)
+ return IOMMU_DOMAIN_DMA;
+
/*
* Do not identity map IOMMUv2 capable devices when:
* - memory encryption is active, because some of those devices