* [Qemu-devel] [6221] virtio-net migration fix (Mark McLoughlin)
@ 2009-01-07 17:50 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-07 17:50 UTC (permalink / raw)
To: qemu-devel
Revision: 6221
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6221
Author: aliguori
Date: 2009-01-07 17:50:45 +0000 (Wed, 07 Jan 2009)
Log Message:
-----------
virtio-net migration fix (Mark McLoughlin)
We are failing to save whether the guest will supply us rx
buffers using the new mergeable format; this can cause a
migrated guest to crash with:
virtio-net header not in first element
Bump the savevm version number and refuse to load v1 saves
just to be on the safe side.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/hw/virtio-net.c
Modified: trunk/hw/virtio-net.c
===================================================================
--- trunk/hw/virtio-net.c 2009-01-07 17:48:51 UTC (rev 6220)
+++ trunk/hw/virtio-net.c 2009-01-07 17:50:45 UTC (rev 6221)
@@ -275,19 +275,21 @@
qemu_put_buffer(f, n->mac, 6);
qemu_put_be32(f, n->tx_timer_active);
+ qemu_put_be32(f, n->mergeable_rx_bufs);
}
static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIONet *n = opaque;
- if (version_id != 1)
+ if (version_id != 2)
return -EINVAL;
virtio_load(&n->vdev, f);
qemu_get_buffer(f, n->mac, 6);
n->tx_timer_active = qemu_get_be32(f);
+ n->mergeable_rx_bufs = qemu_get_be32(f);
if (n->tx_timer_active) {
qemu_mod_timer(n->tx_timer,
@@ -324,7 +326,7 @@
n->tx_timer_active = 0;
n->mergeable_rx_bufs = 0;
- register_savevm("virtio-net", virtio_net_id++, 1,
+ register_savevm("virtio-net", virtio_net_id++, 2,
virtio_net_save, virtio_net_load, n);
return (PCIDevice *)n;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-07 17:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 17:50 [Qemu-devel] [6221] virtio-net migration fix (Mark McLoughlin) Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).