On Wed, 29 Jun 2016 14:23:42 +0200 Marc-André Lureau <marcandre.lur...@gmail.com> wrote:
> 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 All of this is related to the event notifier not being ready when switching the handler. We'll try to read with EventNotifier not being setup (which results in the hang). Doing an exit on deassign if ioeventfd is not started makes the test pass. I'll give the requirements for starting the ioeventfd and switching the handler some more thought. But at least I now know where to poke.