From: Anthony Liguori <anthony@codemonkey.ws>
To: Mark McLoughlin <markmc@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] virtio-net migration fix
Date: Tue, 06 Jan 2009 11:26:20 -0600 [thread overview]
Message-ID: <4963943C.8060304@codemonkey.ws> (raw)
In-Reply-To: <1231242281-2597-1-git-send-email-markmc@redhat.com>
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 <markmc@redhat.com>
> ---
> 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,
>
next prev parent reply other threads:[~2009-01-06 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 11:44 [Qemu-devel] [PATCH] virtio-net migration fix Mark McLoughlin
2009-01-06 17:26 ` Anthony Liguori [this message]
2009-01-07 10:20 ` [Qemu-devel] " Mark McLoughlin
2009-01-07 17:51 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4963943C.8060304@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).