Message ID | 20190604073459.15651-4-xieyongji@baidu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | virtio: fix some issues of "started" and "start_on_kick" flag | expand |
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6ec45d8f0a..3dc2f8c223 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1575,11 +1575,11 @@ 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)) { - vdev->started = true; - vdev->start_on_kick = false; + if (unlikely(vdev->start_on_kick)) { + vdev->started = true; + vdev->start_on_kick = false; + } } }