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

2016-09-05 Thread Jason Wang
On 2016年09月05日 10:26, Wei Xu wrote: On 2016年08月30日 11:06, Jason Wang wrote: @@ -1587,6 +1595,11 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) } if (legacy) { +if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { +error_setg(er

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

2016-09-04 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 11:06:50AM +0800, Jason Wang wrote: > @@ -1587,6 +1595,11 @@ static void virtio_pci_device_plugged(DeviceState *d, > Error **errp) > } > > if (legacy) { > +if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { > +error_setg(errp, "VIR

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

2016-09-04 Thread Wei Xu
On 2016年08月30日 11:06, Jason Wang wrote: @@ -1587,6 +1595,11 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) } if (legacy) { +if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { +error_setg(errp, "VIRTIO_F_IOMMU_PLATFORM was suppor

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

2016-08-30 Thread Jason Wang
On 2016年08月30日 15:31, Cornelia Huck wrote: On Tue, 30 Aug 2016 11:06:50 +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 i

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

2016-08-30 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 01:02:14PM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 30, 2016 at 09:31:27AM +0200, Cornelia Huck wrote: > > On Tue, 30 Aug 2016 11:06:50 +0800 > > Jason Wang wrote: > > > > > Currently, all virtio devices bypass IOMMU completely. This is because > > > address_space_me

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

2016-08-30 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 09:31:27AM +0200, Cornelia Huck wrote: > On Tue, 30 Aug 2016 11:06:50 +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] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-08-30 Thread Cornelia Huck
On Tue, 30 Aug 2016 11:06:50 +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

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

2016-08-29 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