From 4bd191157e4633884f6b0f1695fbf0ca54253865 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 23 Jun 2020 21:51:35 +0200 Subject: [PATCH] 5.7-stable patches added patches: iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch --- ...emove-real-dma-lookup-in-find_domain.patch | 39 +++++++++++++++++++ queue-5.7/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-5.7/iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch diff --git a/queue-5.7/iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch b/queue-5.7/iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch new file mode 100644 index 00000000000..ff32742fbd9 --- /dev/null +++ b/queue-5.7/iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch @@ -0,0 +1,39 @@ +From bba9cc2cf82840bd3c9b3f4f7edac2dc8329c241 Mon Sep 17 00:00:00 2001 +From: Jon Derrick +Date: Wed, 27 May 2020 10:56:17 -0600 +Subject: iommu/vt-d: Remove real DMA lookup in find_domain + +From: Jon Derrick + +commit bba9cc2cf82840bd3c9b3f4f7edac2dc8329c241 upstream. + +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 +Acked-by: Lu Baolu +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 +Signed-off-by: Sushma Kalakota +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iommu/intel-iommu.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/iommu/intel-iommu.c ++++ b/drivers/iommu/intel-iommu.c +@@ -2518,9 +2518,6 @@ struct dmar_domain *find_domain(struct d + 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 = dev->archdata.iommu; + if (likely(info)) diff --git a/queue-5.7/series b/queue-5.7/series index 9227af955d0..5d3c0b10db5 100644 --- a/queue-5.7/series +++ b/queue-5.7/series @@ -474,3 +474,4 @@ powerpc-64s-fix-kvm-interrupt-using-wrong-save-area.patch e1000e-do-not-wake-up-the-system-via-wol-if-device-wakeup-is-disabled.patch net-octeon-mgmt-repair-filling-of-rx-ring.patch net-core-device_rename-use-rwsem-instead-of-a-seqcount.patch +iommu-vt-d-remove-real-dma-lookup-in-find_domain.patch -- 2.47.3