[RFC V2] virtio: Add platform specific DMA API translation for virito devices
Michael S. Tsirkin
mst at redhat.com
Wed Jun 13 23:49:39 AEST 2018
On Thu, Jun 07, 2018 at 11:36:55PM -0700, Christoph Hellwig wrote:
> > This seems to be what was being asked for in this thread,
> > with comments claiming IOMMU flag adds too much overhead.
>
> Right now it means implementing a virtual iommu, which I agree is
> way too much overhead.
Well not really. The flag in question will have a desired effect without
a virtual iommu.
> > SEV guys report that they just set the iommu flag and then it all works.
> > I guess if there's translation we can think of this as a kind of iommu.
> > Maybe we should rename PLATFORM_IOMMU to PLARTFORM_TRANSLATION?
>
> VIRTIO_F_BEHAVES_LIKE_A_REAL_PCI_DEVICE_DONT_TRY_TO_OUTSMART_ME
>
> as said it's not just translations, it is cache coherence as well.
Well it's only for DMA. So maybe PLATFORM_DMA.
I suspect people will then come and complain that they
do *not* want cache coherence tricks because virtio is
running on a CPU, but we'll see.
> > And apparently some people complain that just setting that flag makes
> > qemu check translation on each access with an unacceptable performance
> > overhead. Forcing same behaviour for everyone on general principles
> > even without the flag is unlikely to make them happy.
>
> That sounds like a qemu implementation bug. If qemu knowns that
> guest physiscall == guest dma space there is no need to check.
Possibly. Or it's possible it's all just theoretical, no one
posted any numbers.
--
MST
More information about the Linuxppc-dev
mailing list