mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
virtio-net: update nc.link_down in virtio_net_load()
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 <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
This commit is contained in:
parent
e4b8236440
commit
9899148110
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue