From: Stefan Hajnoczi Date: Thu, 12 Jan 2017 11:46:11 +0000 (+0000) Subject: virtio: disable notifications again after poll succeeded X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1448c133e19372359d9de68626c06088ba79a34b;p=qemu.git virtio: disable notifications again after poll succeeded 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Richard Henderson Tested-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index f04ab7aa6d..34065c78f8 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -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; }