Commit 98957025 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 448b3fe5 65ade565
...@@ -2754,6 +2754,10 @@ static int amd_iommu_def_domain_type(struct device *dev) ...@@ -2754,6 +2754,10 @@ static int amd_iommu_def_domain_type(struct device *dev)
if (!dev_data) if (!dev_data)
return 0; 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: * Do not identity map IOMMUv2 capable devices when:
* - memory encryption is active, because some of those devices * - memory encryption is active, because some of those devices
......
...@@ -221,11 +221,9 @@ static irqreturn_t nvidia_smmu_context_fault(int irq, void *dev) ...@@ -221,11 +221,9 @@ static irqreturn_t nvidia_smmu_context_fault(int irq, void *dev)
unsigned int inst; unsigned int inst;
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
struct arm_smmu_device *smmu; struct arm_smmu_device *smmu;
struct iommu_domain *domain = dev; struct arm_smmu_domain *smmu_domain = dev;
struct arm_smmu_domain *smmu_domain;
struct nvidia_smmu *nvidia; struct nvidia_smmu *nvidia;
smmu_domain = container_of(domain, struct arm_smmu_domain, domain);
smmu = smmu_domain->smmu; smmu = smmu_domain->smmu;
nvidia = to_nvidia_smmu(smmu); nvidia = to_nvidia_smmu(smmu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment