On Tue, 9 Mar 2021 15:18:56 +
Stefan Hajnoczi wrote:
> On Mon, Mar 08, 2021 at 01:31:40PM +0100, Greg Kurz wrote:
> > @@ -363,8 +367,30 @@ static int vhost_user_read(struct vhost_dev *dev,
> > VhostUserMsg *msg)
> > qemu_chr_be_update_read_handlers(chr->chr, ctxt);
> > qemu_chr_fe_
On Mon, Mar 08, 2021 at 01:31:40PM +0100, Greg Kurz wrote:
> @@ -363,8 +367,30 @@ static int vhost_user_read(struct vhost_dev *dev,
> VhostUserMsg *msg)
> qemu_chr_be_update_read_handlers(chr->chr, ctxt);
> qemu_chr_fe_add_watch(chr, G_IO_IN | G_IO_HUP, vhost_user_read_cb,
> &data);
>
Now that everything is in place, have the nested event loop to monitor
the slave channel. The source in the main event loop is destroyed and
recreated to ensure any pending even for the slave channel that was
previously detected is purged. This guarantees that the main loop
wont invoke slave_read()