From: Michael S. Tsirkin Date: Fri, 4 Nov 2016 10:27:52 +0000 (+0200) Subject: virtio-net: mark VIRTIO_NET_F_GSO as legacy X-Git-Tag: v2.7.1~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1372d6e1489d01f3accbd6a3e5c4d45fa27ed45;p=thirdparty%2Fqemu.git virtio-net: mark VIRTIO_NET_F_GSO as legacy virtio 1.0 spec says this is a legacy feature bit, hide it from guests in modern mode. Note: for cross-version migration compatibility, we keep the bit set in host_features. The result will be that a guest migrating cross-version will see host features change under it. As guests only seem to read it once, this should not be an issue. Meanwhile, will work to fix guests to ignore this bit in virtio1 mode, too. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck (cherry picked from commit 2a083ffd2e37ef08769749a5c7cfc6ca65c9f8ea) Signed-off-by: Michael Roth --- diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 01f1351554a..abc48d8b2e4 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1904,6 +1904,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data) vdc->guest_notifier_pending = virtio_net_guest_notifier_pending; vdc->load = virtio_net_load_device; vdc->save = virtio_net_save_device; + vdc->legacy_features |= (0x1 << VIRTIO_NET_F_GSO); } static const TypeInfo virtio_net_info = {