[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] virtio-net: update nc.link_down in virtio_net_l
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 3/4] virtio-net: update nc.link_down in virtio_net_load() |
Date: |
Mon, 8 Oct 2012 14:03:02 +0200 |
From: Amos Kong <address@hidden>
nc.link_down could not be migrated, this patch updates link_down in
virtio_post_load() to keep it coincident with real link status.
Signed-off-by: Amos Kong <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/virtio-net.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 247d7be..8342391 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -973,6 +973,11 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int
version_id)
}
}
n->mac_table.first_multi = i;
+
+ /* nc.link_down can't be migrated, so infer link_down according
+ * to link status bit in n->status */
+ n->nic->nc.link_down = (n->status & VIRTIO_NET_S_LINK_UP) == 0;
+
return 0;
}
--
1.7.11.4