Skip to contentSkip to conversation

qemu-kvm: fix migration with virtio-net

PATCH Applied Michael S. Tsirkin 2 participants 2 messages Jul 2, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-kvm: fix migration with virtio-net

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.

---
 hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/virtio-net.c +1 -1
index 215f9d0..6b82232 100644
@@ -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
Signature · 1 line
1.6.2.2
Applied
#1 lore raw
Quoted 6 lines · Michael S. Tsirkin

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.

Signature · 1 line
error compiling committee.c: too many arguments to function