Re: [Qemu-devel] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-03 Thread Jason Wang
On 2016年11月04日 03:46, Michael S. Tsirkin wrote: @@ -244,6 +245,7 @@ int virtio_queue_empty(VirtQueue *vq) > static void virtqueue_unmap_sg(VirtQueue *vq, const VirtQueueElement *elem, > unsigned int len) > { >+AddressSpace *dma_as = virtio_get_dma_as(vq->vd

Re: [Qemu-devel] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2016 at 05:27:14PM +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] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-03 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