From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
"helgaas@kernel.org" <helgaas@kernel.org>
Cc: "hch@lst.de" <hch@lst.de>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"joro@8bytes.org" <joro@8bytes.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>
Subject: Re: [PATCH v4 4/7] iommu/vt-d: Use pci_real_dma_dev() for mapping
Date: Tue, 21 Jan 2020 01:22:47 +0000 [thread overview]
Message-ID: <8fcd8782dfdfb567e7399b78f552658f9cd9f5b1.camel@intel.com> (raw)
In-Reply-To: <88149be1-1e5d-f0d2-ba5d-6e979014f11e@linux.intel.com>
Good catch. Thanks Baolu.
Will do v5 fixing this and Christoph's nit
On Tue, 2020-01-21 at 09:06 +0800, Lu Baolu wrote:
> Hi,
>
> On 1/18/20 12:27 AM, Jon Derrick wrote:
> > The PCI device may have a DMA requester on another bus, such as VMD
> > subdevices needing to use the VMD endpoint. This case requires the real
> > DMA device when mapping to IOMMU.
> >
> > Signed-off-by: Jon Derrick<jonathan.derrick@intel.com>
> > ---
> > drivers/iommu/intel-iommu.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> > index 0c8d81f..01a1b0f 100644
> > --- a/drivers/iommu/intel-iommu.c
> > +++ b/drivers/iommu/intel-iommu.c
> > @@ -782,6 +782,8 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
> > return NULL;
> > #endif
> >
> > + pdev = pci_real_dma_dev(dev);
>
> This isn't correct. It will result in a compiling error when bisect.
>
> Best regards,
> baolu
next prev parent reply other threads:[~2020-01-21 1:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 16:27 [PATCH v4 0/7] Clean up VMD DMA Map Ops Jon Derrick
2020-01-17 16:27 ` [PATCH v4 1/7] x86/PCI: Add a to_pci_sysdata helper Jon Derrick
2020-01-17 16:27 ` [PATCH v4 2/7] x86/PCI: Expose VMD's PCI Device in pci_sysdata Jon Derrick
2020-01-17 16:27 ` [PATCH v4 3/7] PCI: Introduce pci_real_dma_dev() Jon Derrick
2020-01-17 16:27 ` [PATCH v4 4/7] iommu/vt-d: Use pci_real_dma_dev() for mapping Jon Derrick
2020-01-19 22:18 ` Christoph Hellwig
2020-01-21 1:06 ` Lu Baolu
2020-01-21 1:22 ` Derrick, Jonathan [this message]
2020-01-17 16:27 ` [PATCH v4 5/7] iommu/vt-d: Remove VMD child device sanity check Jon Derrick
2020-01-17 16:27 ` [PATCH v4 6/7] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-20 10:58 ` Lorenzo Pieralisi
2020-01-17 16:27 ` [PATCH v4 7/7] x86/PCI: Remove X86_DEV_DMA_OPS Jon Derrick
2020-01-19 22:25 ` [PATCH v4 0/7] Clean up VMD DMA Map Ops Christoph Hellwig
2020-01-20 11:02 ` Lorenzo Pieralisi
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=8fcd8782dfdfb567e7399b78f552658f9cd9f5b1.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.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).