OSDN Git Service

dataplane: sync virtio.c and vring.c virtqueue state
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 1 Jul 2013 11:29:17 +0000 (13:29 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 19 Jul 2013 04:29:21 +0000 (12:29 +0800)
commit9154b02c53bb6685797c973fcdbec51c4714777d
tree0ecfc49d77e7bf9992b9986d108a6102926c8d2c
parent0c14fb47ece5ef42d7a0a4b3e8e43e022b375720
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 <stefanha@redhat.com>
hw/block/dataplane/virtio-blk.c
hw/virtio/dataplane/vring.c
include/hw/virtio/dataplane/vring.h