From 9154b02c53bb6685797c973fcdbec51c4714777d Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 1 Jul 2013 13:29:17 +0200 Subject: dataplane: sync virtio.c and vring.c virtqueue state Load the virtio.c state into vring.c when we start dataplane mode and vice versa when stopping dataplane mode. This patch makes it possible to start and stop dataplane any time while the guest is running. This will eventually allow us to go back to QEMU main loop for bdrv_drain_all() and live migration. In the meantime, this patch makes the dataplane lifecycle more robust but should make no visible difference. It may be useful in the virtio-net dataplane effort. Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/block/dataplane') diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 03566650c6..2faed43127 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -537,7 +537,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s) /* Clean up guest notifier (irq) */ k->set_guest_notifiers(qbus->parent, 1, false); - vring_teardown(&s->vring); + vring_teardown(&s->vring, s->vdev, 0); s->started = false; s->stopping = false; } -- cgit v1.2.3