stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/vt-d: Remove real DMA lookup in find_domain
@ 2020-06-23 19:27 Sushma Kalakota
  2020-06-23 19:41 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Sushma Kalakota @ 2020-06-23 19:27 UTC (permalink / raw)
  To: stable
  Cc: Jon Derrick, Bjorn Helgaas, Lorenzo Pieralisi, Sushma Kalakota,
	Joerg Roedel

From: Jon Derrick <jonathan.derrick@intel.com>

commit 	bba9cc2cf82840bd3c9b3f4f7edac2dc8329ci241 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 <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>
Signed-off-by: Sushma Kalakota <sushmax.kalakota@intel.com>
---
Hi,

Please apply this patch to 5.7 (and 5.6 if it's still being maintained).
This patch is part 3 of a 3-patch series, of which [1][2] have been
applied to 5.7. This patch is necessary to prevent kernel panics in
specific configurations.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8038bdb8553313ad53bfcffcf8294dd0ab44618f
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4fda230ecddc2573ed88632e98b69b0b9b68c0ad

 drivers/iommu/intel-iommu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 11ed871dd255..fde7aba49b74 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2518,9 +2518,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 = dev->archdata.iommu;
 	if (likely(info))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/vt-d: Remove real DMA lookup in find_domain
  2020-06-23 19:27 [PATCH] iommu/vt-d: Remove real DMA lookup in find_domain Sushma Kalakota
@ 2020-06-23 19:41 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-06-23 19:41 UTC (permalink / raw)
  To: Sushma Kalakota
  Cc: stable, Jon Derrick, Bjorn Helgaas, Lorenzo Pieralisi,
	Joerg Roedel

On Tue, Jun 23, 2020 at 01:27:33PM -0600, Sushma Kalakota wrote:
> From: Jon Derrick <jonathan.derrick@intel.com>
> 
> commit 	bba9cc2cf82840bd3c9b3f4f7edac2dc8329ci241 upstream

That commit id is not in Linus's tree :(


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-23 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 19:27 [PATCH] iommu/vt-d: Remove real DMA lookup in find_domain Sushma Kalakota
2020-06-23 19:41 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).