Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Jason Wang
On 11/23/2015 05:36 PM, Cornelia Huck wrote: > On Mon, 23 Nov 2015 15:41:11 +0800 > Jason Wang wrote: > >> Currently, all virtio devices bypass IOMMU completely. This is because >> address_space_memory is assumed and used during DMA emulation. This >> patch converts the virtio core API to use DM

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Jason Wang
On 11/23/2015 04:06 PM, Michael S. Tsirkin wrote: > On Mon, Nov 23, 2015 at 03:41:11PM +0800, Jason Wang wrote: >> Currently, all virtio devices bypass IOMMU completely. This is because >> address_space_memory is assumed and used during DMA emulation. This >> patch converts the virtio core API to

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Peter Maydell
On 23 November 2015 at 14:34, Cornelia Huck wrote: > The mmio transport is a completely different beast; I'm afraid I don't > know enough about it to say how it interacts with iommus. Conceptually, it's just a device that does DMA, I think. You could in theory put it behind an IOMMU, but nobody d

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Cornelia Huck
On Mon, 23 Nov 2015 11:52:50 +0200 "Michael S. Tsirkin" wrote: > On Mon, Nov 23, 2015 at 10:36:45AM +0100, Cornelia Huck wrote: > > On Mon, 23 Nov 2015 15:41:11 +0800 > > Jason Wang wrote: > > > > > Currently, all virtio devices bypass IOMMU completely. This is because > > > address_space_memor

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Michael S. Tsirkin
On Mon, Nov 23, 2015 at 10:36:45AM +0100, Cornelia Huck wrote: > On Mon, 23 Nov 2015 15:41:11 +0800 > Jason Wang wrote: > > > Currently, all virtio devices bypass IOMMU completely. This is because > > address_space_memory is assumed and used during DMA emulation. This > > patch converts the virti

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Cornelia Huck
On Mon, 23 Nov 2015 15:41:11 +0800 Jason Wang wrote: > Currently, all virtio devices bypass IOMMU completely. This is because > address_space_memory is assumed and used during DMA emulation. This > patch converts the virtio core API to use DMA API. This idea is > > - introducing a new transport

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Michael S. Tsirkin
On Mon, Nov 23, 2015 at 03:41:11PM +0800, Jason Wang wrote: > Currently, all virtio devices bypass IOMMU completely. This is because > address_space_memory is assumed and used during DMA emulation. This > patch converts the virtio core API to use DMA API. This idea is > > - introducing a new trans

[Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-22 Thread Jason Wang
Currently, all virtio devices bypass IOMMU completely. This is because address_space_memory is assumed and used during DMA emulation. This patch converts the virtio core API to use DMA API. This idea is - introducing a new transport specific helper to query the dma address space. (only pci versi