mirror of https://github.com/xemu-project/xemu.git
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: Xie Yongji <xieyongji@baidu.com> Message-Id: <20190626023130.31315-5-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
868a8f44f5
commit
8b04e2c797
|
@ -1571,10 +1571,10 @@ 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);
|
||||
if (unlikely(vdev->start_on_kick)) {
|
||||
virtio_set_started(vdev, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue