qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost
Date: Wed, 29 Jun 2016 16:15:46 +0200

On Wed, 29 Jun 2016 14:23:42 +0200
Marc-André Lureau <address@hidden> wrote:

> Hi
> 
> On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck <address@hidden> 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 <address@hidden>
> > Reported-by: Marc-André Lureau <address@hidden>
> > Signed-off-by: Cornelia Huck <address@hidden>
> > ---
> >
> > 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

I can reproduce it, but I have zero ideas on how to proceed.

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...)

Looking at the code path, we really should switch the handler around,
but virtio_queue_set_host_notifier_fd_handler always unsets the handler
unless both assign and set_handler are true. Is that really what we
want?

I fear I have stared at this for so long that I have now lost myself
between all these flags, so I hope one of the folks on cc: has a good
idea...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]