Re: [Qemu-devel] [RFC v2 4/4] spec/vhost-user spec: Add IOMMU support

2017-04-19 Thread Maxime Coquelin
On 04/17/2017 05:50 AM, Peter Xu wrote: On Fri, Apr 14, 2017 at 07:40:56PM +0200, Maxime Coquelin wrote: [...] +IOMMU support +- + +When the VIRTIO_F_IOMMU_PLATFORM feature has been negotiated, the master has +to send IOTLB entries update & invalidation by sending VHOST_USER_IOTL

Re: [Qemu-devel] [RFC v2 4/4] spec/vhost-user spec: Add IOMMU support

2017-04-16 Thread Peter Xu
On Fri, Apr 14, 2017 at 07:40:56PM +0200, Maxime Coquelin wrote: [...] > +IOMMU support > +- > + > +When the VIRTIO_F_IOMMU_PLATFORM feature has been negotiated, the master has > +to send IOTLB entries update & invalidation by sending VHOST_USER_IOTLB_MSG > +requests to the slave with

Re: [Qemu-devel] [RFC v2 4/4] spec/vhost-user spec: Add IOMMU support

2017-04-14 Thread Maxime Coquelin
On 04/14/2017 07:40 PM, Maxime Coquelin wrote: static void slave_read(void *opaque) { struct vhost_dev *dev = opaque; @@ -611,6 +639,8 @@ static void slave_read(void *opaque) } switch (msg.request) { Oops, I missed "case VHOST_USER_SLAVE_IOTLB_MSG:" here.. +ret = vho

[Qemu-devel] [RFC v2 4/4] spec/vhost-user spec: Add IOMMU support

2017-04-14 Thread Maxime Coquelin
This patch specifies and implements the master/slave communication to support device IOTLB in slave. The vhost_iotlb_msg structure introduced for kernel backends is re-used, making the design close between the two backends. An exception is the use of the secondary channel to enable the slave to s