]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio: recalculate vq->inuse after migration
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 15 Aug 2016 12:54:15 +0000 (13:54 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 8 Sep 2016 19:46:02 +0000 (14:46 -0500)
commit8e44714fe9f471474a439cafaaa386ffbddfa24a
tree57c93f7d35b1809486a9461f9dc6756621fa4a21
parentd00d89a685ae8d1ac8c600127962c29773b96d79
virtio: recalculate vq->inuse after migration

The vq->inuse field is not migrated.  Many devices don't hold
VirtQueueElements across migration so it doesn't matter that vq->inuse
starts at 0 on the destination QEMU.

At least virtio-serial, virtio-blk, and virtio-balloon migrate while
holding VirtQueueElements.  For these devices we need to recalculate
vq->inuse upon load so the value is correct.

Cc: qemu-stable@nongnu.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit bccdef6b1a204db0f41ffb6e24ce373e4d7890d4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c