[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 3/5] virtio: Make sure we get correct state of de
From: |
elohimes |
Subject: |
[Qemu-devel] [PATCH v2 3/5] virtio: Make sure we get correct state of device on handle_aio_output() |
Date: |
Tue, 4 Jun 2019 15:34:57 +0800 |
From: Xie Yongji <address@hidden>
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 <address@hidden>
---
hw/virtio/virtio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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;
+ }
}
}
--
2.17.1
[Qemu-devel] [PATCH v2 3/5] virtio: Make sure we get correct state of device on handle_aio_output(),
elohimes <=
[Qemu-devel] [PATCH v2 4/5] virtio: Don't change "started" flag on virtio_vmstate_change(), elohimes, 2019/06/04
[Qemu-devel] [PATCH v2 5/5] virtio: add "use-started" property, elohimes, 2019/06/04