iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jon Derrick <jonathan.derrick@intel.com>
To: <linux-pci@vger.kernel.org>, Bjorn Helgaas <helgaas@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: iommu@lists.linux-foundation.org, Keith Busch <kbusch@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Christoph Hellwig <hch@lst.de>,
	Jon Derrick <jonathan.derrick@intel.com>
Subject: [PATCH v5 5/7] iommu/vt-d: Remove VMD child device sanity check
Date: Tue, 21 Jan 2020 06:37:49 -0700	[thread overview]
Message-ID: <1579613871-301529-6-git-send-email-jonathan.derrick@intel.com> (raw)
In-Reply-To: <1579613871-301529-1-git-send-email-jonathan.derrick@intel.com>

This removes the sanity check required for VMD child devices. The new
pci_real_dma_dev() DMA alias mechanism places them in the same IOMMU
group as the VMD endpoint. Assignment of the group would require
assigning the VMD endpoint, where unbinding the VMD endpoint removes the
child device domain from the hierarchy.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
---
 drivers/iommu/intel-iommu.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 72f26e8..7e2c492f 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -774,15 +774,7 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
 	if (dev_is_pci(dev)) {
 		struct pci_dev *pf_pdev;
 
-		pdev = to_pci_dev(dev);
-
-#ifdef CONFIG_X86
-		/* VMD child devices currently cannot be handled individually */
-		if (is_vmd(pdev->bus))
-			return NULL;
-#endif
-
-		pdev = pci_real_dma_dev(pdev);
+		pdev = pci_real_dma_dev(to_pci_dev(dev));
 
 		/* VFs aren't listed in scope tables; we need to look up
 		 * the PF instead to find the IOMMU. */
-- 
1.8.3.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2020-01-21 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 13:37 [PATCH v5 0/7] Clean up VMD DMA Map Ops Jon Derrick
2020-01-21 13:37 ` [PATCH v5 1/7] x86/PCI: Add a to_pci_sysdata helper Jon Derrick
2020-01-21 13:37 ` [PATCH v5 2/7] x86/PCI: Expose VMD's PCI Device in pci_sysdata Jon Derrick
2020-01-21 13:37 ` [PATCH v5 3/7] PCI: Introduce pci_real_dma_dev() Jon Derrick
2020-01-22 21:12   ` Bjorn Helgaas
2020-01-23 16:08     ` Lorenzo Pieralisi
2020-01-21 13:37 ` [PATCH v5 4/7] iommu/vt-d: Use pci_real_dma_dev() for mapping Jon Derrick
2020-01-22  4:37   ` Lu Baolu
2020-01-21 13:37 ` Jon Derrick [this message]
2020-01-22  4:37   ` [PATCH v5 5/7] iommu/vt-d: Remove VMD child device sanity check Lu Baolu
2020-01-21 13:37 ` [PATCH v5 6/7] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-22 16:56   ` Keith Busch
2020-01-21 13:37 ` [PATCH v5 7/7] x86/PCI: Remove X86_DEV_DMA_OPS Jon Derrick
2020-01-24 21:02 ` [PATCH v5 0/7] Clean up VMD DMA Map Ops Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579613871-301529-6-git-send-email-jonathan.derrick@intel.com \
    --to=jonathan.derrick@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).