From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "hch@lst.de" <hch@lst.de>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"helgaas@kernel.org" <helgaas@kernel.org>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [RFC 4/5] PCI: vmd: Stop overriding dma_map_ops
Date: Thu, 9 Jan 2020 15:08:11 +0000 [thread overview]
Message-ID: <a75078a7a12f17c37782afd55bb97fece63752d5.camel@intel.com> (raw)
In-Reply-To: <20200109143613.GC22656@lst.de>
On Thu, 2020-01-09 at 15:36 +0100, Christoph Hellwig wrote:
> On Tue, Dec 31, 2019 at 01:24:22PM -0700, Jon Derrick wrote:
> > Devices on the VMD domain use the VMD endpoint's requester-id and have
> > been relying on the VMD endpoint's dma operations. The downside of this
> > was that VMD domain devices would use the VMD endpoint's attributes when
> > doing DMA and IOMMU mapping. We can be smarter about this by only using
> > the VMD endpoint when mapping and providing the correct child device's
> > attributes during dma operations.
> >
> > This patch adds a new dma alias mechanism by adding a hint to a pci_dev
> > to point to a singular DMA requester's pci_dev. This integrates into the
> > existing dma alias infrastructure to reduce the impact of the changes
> > required to support this mode.
>
> If we want to lift this check into common code I think it should go
> into struct device, as that is what DMA operates on normally.
I thought about that too, but the dma alias mechanism was in pci_dev. I
can prepare a new version with struct device.
> That
> being said given that this insane hack only exists for braindamage in
> Intel hardware I'd rather keep it as isolated as possible.
jmho but the footprint of the new set is pretty minimal and removes a
lot of dubious code in vmd.c.
next prev parent reply other threads:[~2020-01-09 15:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 20:24 [RFC 0/5] Clean up VMD DMA Map Ops Jon Derrick
2019-12-31 20:24 ` [RFC 1/5] iommu: Remove device link to group on failure Jon Derrick
2020-01-01 3:59 ` Lu Baolu
2019-12-31 20:24 ` [RFC 2/5] iommu/vt-d: Unlink device if failed to add to group Jon Derrick
2020-01-01 4:05 ` Lu Baolu
2020-01-12 1:36 ` Lu Baolu
2020-01-13 12:20 ` Joerg Roedel
2020-01-14 1:58 ` Lu Baolu
2019-12-31 20:24 ` [RFC 3/5] x86/PCI: Expose VMD's device in pci_sysdata Jon Derrick
2020-01-09 14:33 ` Christoph Hellwig
2020-01-09 15:06 ` Derrick, Jonathan
2020-01-09 16:45 ` Derrick, Jonathan
2019-12-31 20:24 ` [RFC 4/5] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-09 14:36 ` Christoph Hellwig
2020-01-09 15:08 ` Derrick, Jonathan [this message]
2019-12-31 20:24 ` [RFC 5/5] x86/PCI: Remove unused X86_DEV_DMA_OPS Jon Derrick
2020-01-09 14:37 ` Christoph Hellwig
2020-01-09 15:06 ` Derrick, Jonathan
2020-01-07 13:41 ` [RFC 0/5] Clean up VMD DMA Map Ops Joerg Roedel
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=a75078a7a12f17c37782afd55bb97fece63752d5.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).