public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: fix migration with virtio-net
@ 2009-07-02 12:20 Michael S. Tsirkin
  2009-07-02 12:25 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2009-07-02 12:20 UTC (permalink / raw)
  To: avi, kvm

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qemu-kvm: fix migration with virtio-net
  2009-07-02 12:20 [PATCH] qemu-kvm: fix migration with virtio-net Michael S. Tsirkin
@ 2009-07-02 12:25 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-07-02 12:25 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: kvm

On 07/02/2009 03:20 PM, Michael S. Tsirkin wrote:
> 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.
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-02 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 12:20 [PATCH] qemu-kvm: fix migration with virtio-net Michael S. Tsirkin
2009-07-02 12:25 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox