Hi On Thu, Jul 7, 2016 at 3:00 AM, <marcandre.lur...@redhat.com> wrote: > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > Hi, > > Since 'vhost-user: simple reconnection support' was merged, it is > possible to disconnect and reconnect a vhost-user backend. However, > many code paths in qemu may trigger assert() when the backend is > disconnected. > > Some assert() could simply be replaced by error_report() or silently > fail since they are recoverable cases. Some missing error checks can > also help prevent later issues. In many cases, the code assumes > get_vhost_net() will be non-NULL after a succesful connection, so I > changed it to stay after a disconnect until the new connection comes > (as suggested by Michael). There are also code paths that are wrong, > see "don't assume opaque is a fd" patch for an example. > > Since there is feature checks on reconnection, qemu should wait for > the initial connection feature negotiation to complete. The test added > demonstrates this. Additionally, a regression was found during v2, > which could have been spotted with a multiqueue test, so add a basic > one that would have exhibited the issue. > > For convenience, the series is also available on: > https://github.com/elmarco/qemu, branch vhost-user-reconnect
The branch has been rebased fixing conflicts after Jason Wang "busy polling" got merged. I also tried to improve the commit log in "vhost: fix calling vhost_dev_cleanup() after vhost_dev_init()" patch. thanks -- Marc-André Lureau