Skip to content

Commit 9895702

Browse files
committed
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
2 parents 448b3fe + 65ade56 commit 9895702

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,6 +2754,10 @@ static int amd_iommu_def_domain_type(struct device *dev)
27542754
if (!dev_data)
27552755
return 0;
27562756

2757+
/* Always use DMA domain for untrusted device */
2758+
if (dev_is_pci(dev) && to_pci_dev(dev)->untrusted)
2759+
return IOMMU_DOMAIN_DMA;
2760+
27572761
/*
27582762
* Do not identity map IOMMUv2 capable devices when:
27592763
* - memory encryption is active, because some of those devices

drivers/iommu/arm/arm-smmu/arm-smmu-nvidia.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,9 @@ static irqreturn_t nvidia_smmu_context_fault(int irq, void *dev)
221221
unsigned int inst;
222222
irqreturn_t ret = IRQ_NONE;
223223
struct arm_smmu_device *smmu;
224-
struct iommu_domain *domain = dev;
225-
struct arm_smmu_domain *smmu_domain;
224+
struct arm_smmu_domain *smmu_domain = dev;
226225
struct nvidia_smmu *nvidia;
227226

228-
smmu_domain = container_of(domain, struct arm_smmu_domain, domain);
229227
smmu = smmu_domain->smmu;
230228
nvidia = to_nvidia_smmu(smmu);
231229

0 commit comments

Comments
 (0)