aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Derrick <jonathan.derrick@intel.com>2020-05-27 10:56:17 -0600
committerJoerg Roedel <jroedel@suse.de>2020-05-29 15:11:52 +0200
commitbba9cc2cf82840bd3c9b3f4f7edac2dc8329c241 (patch)
tree8f6d0f30d5b5651e45ae87364c0d5b8cfbe74a67
parentiommu/vt-d: Allocate domain info for real DMA sub-devices (diff)
downloadlinux-dev-bba9cc2cf82840bd3c9b3f4f7edac2dc8329c241.tar.xz
linux-dev-bba9cc2cf82840bd3c9b3f4f7edac2dc8329c241.zip
iommu/vt-d: Remove real DMA lookup in find_domain
By removing the real DMA indirection in find_domain(), we can allow sub-devices of a real DMA device to have their own valid device_domain_info. The dmar lookup and context entry removal paths have been fixed to account for sub-devices. Fixes: 2b0140c69637 ("iommu/vt-d: Use pci_real_dma_dev() for mapping") Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Acked-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20200527165617.297470-4-jonathan.derrick@intel.com Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207575 Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/intel-iommu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 6d39b9bd89a6..5767882aa80f 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2436,9 +2436,6 @@ struct dmar_domain *find_domain(struct device *dev)
if (unlikely(attach_deferred(dev) || iommu_dummy(dev)))
return NULL;
- if (dev_is_pci(dev))
- dev = &pci_real_dma_dev(to_pci_dev(dev))->dev;
-
/* No lock here, assumes no domain exit in normal case */
info = get_domain_info(dev);
if (likely(info))