Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, September 13, 2018 2:10 AM > > On Wed, 12 Sep 2018 13:29:33 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 12, 2018 at 11:15:32AM -0600, Alex Williamson wrote: > > > On Wed, 12 Sep 2018 12:44:15 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > >

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 13:29:33 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 11:15:32AM -0600, Alex Williamson wrote: > > On Wed, 12 Sep 2018 12:44:15 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > > > On Wed,

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 11:15:32AM -0600, Alex Williamson wrote: > On Wed, 12 Sep 2018 12:44:15 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > > On Wed, 12 Sep 2018 12:14:44 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > O

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 12:44:15 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > On Wed, 12 Sep 2018 12:14:44 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > > > On Mon, Jul 3

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > On Wed, 12 Sep 2018 12:14:44 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > > > [...] > > > > > >

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 12:14:44 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > > [...] > > > > > > I generally wonder how are restarts of the backend handled > > > with this a

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > [...] > > > > I generally wonder how are restarts of the backend handled > > with this approach: closing the VFIO device tends to reset > > the whole device. > > Hi M

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Tiwei Bie
On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: [...] > > I generally wonder how are restarts of the backend handled > with this approach: closing the VFIO device tends to reset > the whole device. Hi Michael, I missed this comment previously.. This is a good point! In this R

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-31 Thread Tiwei Bie
On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2018 at 04:10:04PM +0800, Tiwei Bie wrote: > > On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > > > On Fri, 27 Jul 2018 09:58:05 +0800 > > > Tiwei Bie wrote: > > > > > > > On Thu, Jul 26, 2018

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-30 Thread Alex Williamson
On Mon, 30 Jul 2018 12:30:58 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 30, 2018 at 04:10:04PM +0800, Tiwei Bie wrote: > > On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > > > On Fri, 27 Jul 2018 09:58:05 +0800 > > > Tiwei Bie wrote: > > > > > > > On Thu, Jul 26, 2018

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 04:10:04PM +0800, Tiwei Bie wrote: > On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > > On Fri, 27 Jul 2018 09:58:05 +0800 > > Tiwei Bie wrote: > > > > > On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > > > > On Mon, 23 Jul 2018 12:59:56

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-30 Thread Tiwei Bie
On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > On Fri, 27 Jul 2018 09:58:05 +0800 > Tiwei Bie wrote: > > > On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > > > On Mon, 23 Jul 2018 12:59:56 +0800 > > > Tiwei Bie wrote: > > > > > [...] > > > > > > > > +st

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-27 Thread Alex Williamson
On Fri, 27 Jul 2018 09:58:05 +0800 Tiwei Bie wrote: > On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > > On Mon, 23 Jul 2018 12:59:56 +0800 > > Tiwei Bie wrote: > > > [...] > > > > > > +static int vhost_user_slave_handle_vfio_group(struct vhost_dev *dev, > > > +

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-26 Thread Tiwei Bie
On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > On Mon, 23 Jul 2018 12:59:56 +0800 > Tiwei Bie wrote: > [...] > > > > +static int vhost_user_slave_handle_vfio_group(struct vhost_dev *dev, > > + int *fd) > > +{ > > +struct vhost

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-26 Thread Alex Williamson
On Mon, 23 Jul 2018 12:59:56 +0800 Tiwei Bie wrote: > Introduce a slave message to allow slave to share its > VFIO group fd to master and do the IOMMU programming > based on virtio device's DMA address space for this > group in QEMU. > > For the vhost backends which support vDPA, they could > le

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-23 Thread Tiwei Bie
On Mon, Jul 23, 2018 at 12:20:12PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 23, 2018 at 12:59:56PM +0800, Tiwei Bie wrote: [...] > > > > +static int vhost_user_slave_handle_vfio_group(struct vhost_dev *dev, > > + int *fd) > > +{ > > +struct v

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-23 Thread Tiwei Bie
On Mon, Jul 23, 2018 at 12:19:04PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 23, 2018 at 12:59:56PM +0800, Tiwei Bie wrote: [...] > > @@ -815,6 +816,21 @@ Slave message types > >This request should be sent only when > > VHOST_USER_PROTOCOL_F_HOST_NOTIFIER > >protocol feature h

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-23 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 12:59:56PM +0800, Tiwei Bie wrote: > Introduce a slave message to allow slave to share its > VFIO group fd to master and do the IOMMU programming > based on virtio device's DMA address space for this > group in QEMU. > > For the vhost backends which support vDPA, they could

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-23 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 12:59:56PM +0800, Tiwei Bie wrote: > Introduce a slave message to allow slave to share its > VFIO group fd to master and do the IOMMU programming > based on virtio device's DMA address space for this > group in QEMU. > > For the vhost backends which support vDPA, they could

[Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-22 Thread Tiwei Bie
Introduce a slave message to allow slave to share its VFIO group fd to master and do the IOMMU programming based on virtio device's DMA address space for this group in QEMU. For the vhost backends which support vDPA, they could leverage this message to ask master to do the IOMMU programming in QEM