diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-10 20:10:21 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-10 20:10:21 +0300 |
commit | 98957025cf146a0240bb9ffaf50727ac786078ee (patch) | |
tree | d6bdd67ab45572c734ce53d6dc1ca1b708df3bbc /drivers/iommu/amd | |
parent | 448b3fe5a0eab5b625a7e15c67c7972169e47ff8 (diff) | |
parent | 65ade5653f5ab5a21635e51d0c65e95f490f5b6f (diff) | |
download | linux-98957025cf146a0240bb9ffaf50727ac786078ee.tar.xz |
Merge tag 'iommu-fixes-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fixes from Joerg Roedel:
- Fix offset miscalculation on ARM-SMMU driver
- AMD IOMMU fix for initializing state of untrusted devices
* tag 'iommu-fixes-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/arm-smmu: Use the correct type in nvidia_smmu_context_fault()
iommu/amd: Enhance def_domain_type to handle untrusted device
Diffstat (limited to 'drivers/iommu/amd')
-rw-r--r-- | drivers/iommu/amd/iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index e692217fcb28..fb727f5b0b82 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2754,6 +2754,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 |