qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] virtio-net migration fix


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH] virtio-net migration fix
Date: Tue, 06 Jan 2009 11:26:20 -0600
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

Mark McLoughlin wrote:
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

We should bump the version number so that we can gracefully fail migrations where the dest or source end is broken. I would make the virtio_net_load not accept version 1 saves too just to be on the safe side.

Regards,

Anthony Liguori

Signed-off-by: Mark McLoughlin <address@hidden>
---
 hw/virtio-net.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 1f45b2d..66d43d9 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -275,6 +275,7 @@ static void virtio_net_save(QEMUFile *f, void *opaque)
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)
@@ -288,6 +289,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int 
version_id)
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,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]