[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <VI1PR04MB55678E303E4EF6AB2C416793EC430@VI1PR04MB5567.eurprd04.prod.outlook.com>
Date: Mon, 2 Dec 2019 14:58:41 +0000
From: Madalin Bucur <madalin.bucur@....com>
To: Christoph Hellwig <hch@....de>, David Miller <davem@...emloft.net>
CC: Laurentiu Tudor <laurentiu.tudor@....com>,
"robin.murphy@....com" <robin.murphy@....com>,
"joro@...tes.org" <joro@...tes.org>,
Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Ioana Ciornei <ioana.ciornei@....com>,
Leo Li <leoyang.li@....com>,
Diana Madalina Craciun <diana.craciun@....com>,
Camelia Alexandra Groza <camelia.groza@....com>
Subject: RE: [PATCH v3 0/4] dma-mapping: introduce new dma unmap and sync
variants
> -----Original Message-----
> From: Christoph Hellwig <hch@....de>
> To: David Miller <davem@...emloft.net>
> Subject: Re: [PATCH v3 0/4] dma-mapping: introduce new dma unmap and sync
> variants
>
> On Wed, Nov 13, 2019 at 12:11:32PM -0800, David Miller wrote:
> > > This series introduces a few new dma unmap and sync api variants
> that,
> > > on top of what the originals do, return the virtual address
> > > corresponding to the input dma address. In order to do that a new dma
> > > map op is added, .get_virt_addr that takes the input dma address and
> > > returns the virtual address backing it up.
> > > The second patch adds an implementation for this new dma map op in
> the
> > > generic iommu dma glue code and wires it in.
> > > The third patch updates the dpaa2-eth driver to use the new apis.
> >
> > The driver should store the mapping in it's private software state if
> > it needs this kind of conversion.
>
> I think the problem for this driver (and a few others) is that they
> somehow manage to split I/O completions at a different boundary
> than submissions. For me with my block I/O background this seems
> weird, but I'll need networking folks to double check the theory.
>
> > This is huge precendence for this, and there is therefore no need to
> > add even more complication and methods and burdon to architecture code
> > for the sake of this.
>
> Unfortunately there are various drivers that abuse iommu_iova_to_phys
> to get a struct page to unmap. Two of theose are network drivers
> that went in through you (dpaa2 and thunder), additonally the
> caam crypto driver (which I think is the same SOC family as dpaa,
> but I'm not sure) and the AMD GPU driver.
>
> We also have drivers that just don't unmap and this don't work with
> iommus or dma-debug (IBM EMAC another net driver).
>
> That being said I hate these new API, but I still think they are less
> bad than these IOMMU API abuses people do now. If experienced
> networking folks know a way to get rid of both I'm all for it.
Hi,
will this API be included during the v5.5 kernel development cycle or is
there an alternative solution?
Thank you,
Madalin
Powered by blists - more mailing lists