IOMMU Fixes for Linux v6.9-rc7:

Including:
 
 	- Fix offset miscalculation on ARM-SMMU driver
 
 	- AMD IOMMU fix for initializing state of untrusted devices
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmY9+5wACgkQK/BELZcB
 GuPzQg/9EwElcc9Vtdcnoiyl0VgdmlAF3IxLIL8LbM+WEm/PXMK+LnYDBdclLQIo
 lW9v4ZGzm+DKqRF1ksC78/yKWcbfJ31rzkE7Ztf57yzHkVxB1qWe7/ksrpkn0Fjx
 32Y6lhhaw6WACXA1gSvz/TXiL+Zr8F/T++R5Cxc1gCFo11W1A/jrXOKjNgNtNx/U
 O9/uDpIFHdQvvOBmAPpFQi43P7TPb4PylEjPzsJQP239ZTFT7h25vZZHdA3PfyPU
 +nSisgibpOMfyMbqY25q4Qg4+Ek0BvdG3yi8+mlUK9MRKwvebCIBhIsSh2HWSSGu
 jyq0xzPc5Av7ufWNKA9L3jbxgAtnODrc8cUlUQ7lXNNB7hPz10QiDfvMmVXrvcwW
 B8K4agYf2wfK64lJuMpbjbh3qFXbAoWKjQMx7xwji7LVhukdA0ndbERg1YKN3nLO
 39KLatEDgTLqHsKclIbCdwwd8FfYQTFrUTT4nHsVW4YFhtUd8yNuh4bdmOFgHaNg
 /9VhII864BAwWy6P4pYur921rRBorHAQ20PyeOsNOMESFtA7VQOX504zbCayiknf
 dYeoQGUnS202a1gjicpMMWMF5IzZE681Z8YLbndrNyjpiQ5pi8IWDDGstdHqmhtX
 vcc0S0WIMHBlZPbkAATu/A7A3bwymImmbJ1n9y7S6RHbtu/mKGo=
 =zdMj
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-05-10 10:10:21 -07:00
commit 98957025cf
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -221,11 +221,9 @@ static irqreturn_t nvidia_smmu_context_fault(int irq, void *dev)
unsigned int inst;
irqreturn_t ret = IRQ_NONE;
struct arm_smmu_device *smmu;
struct iommu_domain *domain = dev;
struct arm_smmu_domain *smmu_domain;
struct arm_smmu_domain *smmu_domain = dev;
struct nvidia_smmu *nvidia;
smmu_domain = container_of(domain, struct arm_smmu_domain, domain);
smmu = smmu_domain->smmu;
nvidia = to_nvidia_smmu(smmu);