Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-30 Thread Cornelia Huck
On Wed, 29 Jun 2016 14:23:42 +0200 Marc-André Lureau wrote: > Hi > > On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck > wrote: > > When setting up host notifiers, virtio_bus_set_host_notifier() > > simply switches the handler. This will only work, however, if > > the ioeventfd has already been s

Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-29 Thread Cornelia Huck
On Wed, 29 Jun 2016 16:52:40 +0200 Paolo Bonzini wrote: > On 29/06/2016 16:15, Cornelia Huck wrote: > > > > I can see that one of the qemus sits on event_notifier_test_and_clear > > when vhost tries to shut down. (I am thoroughly confused by all of > > that qtest setup, so I have no idea which q

Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-29 Thread Paolo Bonzini
On 29/06/2016 16:15, Cornelia Huck wrote: > > I can see that one of the qemus sits on event_notifier_test_and_clear > when vhost tries to shut down. (I am thoroughly confused by all of > that qtest setup, so I have no idea which qemu instance this is...) Stupid question ahead---if you mean QEMU

Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-29 Thread Cornelia Huck
On Wed, 29 Jun 2016 14:23:42 +0200 Marc-André Lureau wrote: > Hi > > On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck > wrote: > > When setting up host notifiers, virtio_bus_set_host_notifier() > > simply switches the handler. This will only work, however, if > > the ioeventfd has already been s

Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-29 Thread Marc-André Lureau
Hi On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck wrote: > When setting up host notifiers, virtio_bus_set_host_notifier() > simply switches the handler. This will only work, however, if > the ioeventfd has already been setup; this is true for dataplane, > but not for vhost. > > Fix this by starti

[Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost

2016-06-29 Thread Cornelia Huck
When setting up host notifiers, virtio_bus_set_host_notifier() simply switches the handler. This will only work, however, if the ioeventfd has already been setup; this is true for dataplane, but not for vhost. Fix this by starting the ioeventfd if that has not happened before. While we're at it,