All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: avi@redhat.com, kvm@vger.kernel.org
Subject: [PATCH] qemu-kvm: fix migration with virtio-net
Date: Thu, 2 Jul 2009 15:20:15 +0300	[thread overview]
Message-ID: <20090702122015.GA26771@redhat.com> (raw)

Fix up loadvm versioning logic: vnet header should be checked for any
version >= 7, not just for version 7.

Without this patch, migration is broken on qemu-kvm.
Note that qemu.git gets it right.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 215f9d0..6b82232 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -770,7 +770,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
     if (version_id >= 6)
         qemu_get_buffer(f, (uint8_t *)n->vlans, MAX_VLAN >> 3);
 
-    if (version_id == 7 && qemu_get_be32(f)) {
+    if (version_id >= 7 && qemu_get_be32(f)) {
 #ifdef TAP_VNET_HDR
         tap_using_vnet_hdr(n->vc->vlan->first_client, 1);
 #else
-- 
1.6.2.2

             reply	other threads:[~2009-07-02 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 12:20 Michael S. Tsirkin [this message]
2009-07-02 12:25 ` [PATCH] qemu-kvm: fix migration with virtio-net Avi Kivity

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=20090702122015.GA26771@redhat.com \
    --to=mst@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.