Commit 8b04e2c7 authored by Xie Yongji's avatar Xie Yongji Committed by Michael S. Tsirkin
Browse files

virtio: Make sure we get correct state of device on handle_aio_output()



We should set the flags: "start_on_kick" and "started" after we call
the kick functions (handle_aio_output() and handle_output()).

Signed-off-by: default avatarXie Yongji <xieyongji@baidu.com>
Message-Id: <20190626023130.31315-5-xieyongji@baidu.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 868a8f44
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1571,12 +1571,12 @@ void virtio_queue_notify(VirtIODevice *vdev, int n)
        event_notifier_set(&vq->host_notifier);
    } else if (vq->handle_output) {
        vq->handle_output(vdev, vq);
    }

        if (unlikely(vdev->start_on_kick)) {
            virtio_set_started(vdev, true);
        }
    }
}

uint16_t virtio_queue_vector(VirtIODevice *vdev, int n)
{