Re: [PATCH v1 2/2] dma-mapping-common: add DMA attribute - DMA_ATTR_IOMMU_BYPASS

Benjamin Herrenschmidt
2015-11-03T19:35:10Z

On Tue, 2015-11-03 at 14:11 +0100, Christoph Hellwig wrote:
> > xHCI for example, vs. something like 10G ethernet... but yes I agree it
> > sucks. I don't like that sort of policy anywhere in drivers. On the
> > other hand the platform doesn't have much information to make that sort
> > of decision either.
>
> Mabye because it should simply use what's optimal? E.g. passthrough
> whenever possible, where arguments against possible are: dma_mask, vfio
> requirements, kernel command line option.

Right this is what I do today on powerpc with the exception of
the command line option.

> This is what a lot of
> architectures already do, I remember the SGI Origin / Altix code has the
> same behavior as well. Those IOMMUs already had the 64 bit passthrough
> and 32-bit sliding window in addition to the real IOMMU 10 years ago.
> --