]> git.ipfire.org Git - thirdparty/qemu.git/commit - hw/net/virtio-net.c
virtio-net: unbreak self announcement and guest offloads after migration
authorJason Wang <jasowang@redhat.com>
Fri, 11 Sep 2015 08:01:56 +0000 (16:01 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Sep 2015 10:39:46 +0000 (13:39 +0300)
commit1f8828ef573c83365b4a87a776daf8bcef1caa21
tree94ac890c7836776dc22b7e22da33ae07a8a2a868
parent50764fc8a382dc17ccc06c0ba29184d0fd73016e
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>
hw/net/virtio-net.c