[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180529140319.GA19972@infradead.org>
Date: Tue, 29 May 2018 07:03:19 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
aik@...abs.ru, robh@...nel.org, joe@...ches.com,
elfring@...rs.sourceforge.net, david@...son.dropbear.id.au,
jasowang@...hat.com, mpe@...erman.id.au, hch@...radead.org,
luto@...nel.org
Subject: Re: [RFC V2] virtio: Add platform specific DMA API translation for
virito devices
On Tue, May 29, 2018 at 09:56:24AM +1000, Benjamin Herrenschmidt wrote:
> I don't think forcing the addition of an emulated iommu in the middle
> just to work around the fact that virtio "cheats" and doesn't use the
> dma API unless there is one, is the right "fix".
Agreed.
> The right long term fix is to always use the DMA API, reducing code
> path etc... and just have a single point where virtio can "chose"
> alternate DMA ops (via an arch hook to deal with our case).
Also agreed.
When Andi added vring_use_dma_api it was marked as temporary.
So I'd much rather move to blacklisting platforms that needs this
hack now than adding another exception.
And then once we have the blacklist move it to a quirk in the arch
code that just forces dma_direct_ops as the per-device dma ops.
I don't really think this is crazy long term, but something we could
do relatively quickly. Interestingly enough the original commit
mentions PPC64 as a case where this quirk is needed.
Powered by blists - more mailing lists