On Thu, Nov 12, 2020 at 05:19:05PM -0600, Mike Christie wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d229515..9eeb8c7 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -187,13 +187,15 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn) > > /* Init poll structure */ > void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, > - __poll_t mask, struct vhost_dev *dev) > + __poll_t mask, struct vhost_dev *dev, > + struct vhost_virtqueue *vq) > { > init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); > init_poll_funcptr(&poll->table, vhost_poll_func); > poll->mask = mask; > poll->dev = dev; > poll->wqh = NULL; > + poll->vq = vq; > > vhost_work_init(&poll->work, fn); > } Tying the poll mechanism to vqs rather than directly to vhost_worker seems okay for now, but it might be necessary to change this later if drivers want more flexibility about poll something that's not tied to a vq or that uses worker 0. Stefan