Skip to content

Commit

Permalink
virtio: disable notifications again after poll succeeded
Browse files Browse the repository at this point in the history
While AioContext is in polling mode virtqueue notifications are not
necessary.  Some device virtqueue handlers enable notifications.  Make
sure they stay disabled to avoid unnecessary vmexits.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Richard Henderson <rth@twiddle.net>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
stefanhaRH authored and mstsirkin committed Jan 18, 2017
1 parent 332fa82 commit 1448c13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/virtio/virtio.c
Expand Up @@ -2126,6 +2126,9 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque)
}

virtio_queue_notify_aio_vq(vq);

/* In case the handler function re-enabled notifications */
virtio_queue_set_notification(vq, 0);
return true;
}

Expand Down

0 comments on commit 1448c13

Please sign in to comment.