From patchwork Thu Jul 2 12:20:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 33656 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n62CKqHF013264 for ; Thu, 2 Jul 2009 12:20:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbZGBMUq (ORCPT ); Thu, 2 Jul 2009 08:20:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752246AbZGBMUq (ORCPT ); Thu, 2 Jul 2009 08:20:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56257 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbZGBMUp (ORCPT ); Thu, 2 Jul 2009 08:20:45 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n62CKnBr001191 for ; Thu, 2 Jul 2009 08:20:49 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n62CKmrl005098; Thu, 2 Jul 2009 08:20:48 -0400 Received: from redhat.com (vpn-6-112.tlv.redhat.com [10.35.6.112]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n62CKjdZ023144; Thu, 2 Jul 2009 08:20:46 -0400 Date: Thu, 2 Jul 2009 15:20:15 +0300 From: "Michael S. Tsirkin" To: avi@redhat.com, kvm@vger.kernel.org Subject: [PATCH] qemu-kvm: fix migration with virtio-net Message-ID: <20090702122015.GA26771@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- 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