Hi On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck <cornelia.h...@de.ibm.com> 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 starting the ioeventfd if that has not happened > before. > > While we're at it, also fixup the unsetting path of > set_host_notifier_internal(). > > Fixes: 6798e245a3 ("virtio-bus: common ioeventfd infrastructure") > Reported-by: Jason Wang <jasow...@redhat.com> > Reported-by: Marc-André Lureau <marcandre.lur...@gmail.com> > Signed-off-by: Cornelia Huck <cornelia.h...@de.ibm.com> > --- > > This fixes the vhost regression for me, while dataplane continues > to work. >
That doesn't work here, QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/vhost-user-test hangs in /x86_64/vhost-user/migrate > Peter, does this help with your iSCSI regression? > > --- > hw/virtio/virtio-bus.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index 1313760..0136242 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -176,8 +176,8 @@ static int set_host_notifier_internal(DeviceState *proxy, > VirtioBusState *bus, > return r; > } > } else { > - virtio_queue_set_host_notifier_fd_handler(vq, false, false); > k->ioeventfd_assign(proxy, notifier, n, assign); > + virtio_queue_set_host_notifier_fd_handler(vq, false, false); > event_notifier_cleanup(notifier); > } > return r; > @@ -258,6 +258,9 @@ int virtio_bus_set_host_notifier(VirtioBusState *bus, int > n, bool assign) > return -ENOSYS; > } > if (assign) { > + if (!k->ioeventfd_started(proxy)) { > + virtio_bus_start_ioeventfd(bus); > + } > /* > * Stop using the generic ioeventfd, we are doing eventfd handling > * ourselves below > -- > 2.6.6 > -- Marc-André Lureau