virtio-net: unbreak self announcement and guest offloads after migration
commit2935ae915a618bab5b555b8963224fbeac4a5fa9
authorJason Wang <jasowang@redhat.com>
Fri, 11 Sep 2015 08:01:56 +0000 (11 16:01 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 15:36:28 +0000 (21 10:36 -0500)
treecaaa6f0ebc582319fec4f7cbdebfed6840186370
parent2f3c3108186acc992858d2866d3aa20eb2eaf598
virtio-net: unbreak self announcement and guest offloads after migration

After commit 019a3edbb25f1571e876f8af1ce4c55412939e5d ("virtio: make
features 64bit wide"). Device's guest_features was actually set after
vdc->load(). This breaks the assumption that device specific load()
function can check guest_features. For virtio-net, self announcement
and guest offloads won't work after migration.

Fixing this by defer them to virtio_net_load() where guest_features
were guaranteed to be set. Other virtio devices looks fine.

Fixes: 019a3edbb25f1571e876f8af1ce4c55412939e5d
       ("virtio: make features 64bit wide")
Cc: qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit 1f8828ef573c83365b4a87a776daf8bcef1caa21)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/virtio-net.c