qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
	dgilbert@redhat.com, qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] virtio-net: mark VIRTIO_NET_F_GSO as legacy
Date: Fri, 4 Nov 2016 13:01:40 +0200	[thread overview]
Message-ID: <1478257275-30365-3-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1478257275-30365-1-git-send-email-mst@redhat.com>

virtio 1.0 spec says this is a legacy feature bit,
hide it from guests in legacy 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 <mst@redhat.com>
---
 hw/net/virtio-net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 20aa63e..b68c69d 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1942,6 +1942,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 = {
-- 
MST

  parent reply	other threads:[~2016-11-04 11:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 11:01 [Qemu-devel] [PATCH 0/2] virtio-net: spec compatibility fix Michael S. Tsirkin
2016-11-04 11:01 ` [Qemu-devel] [PATCH 1/2] virtio: allow per-device-class legacy features Michael S. Tsirkin
2016-11-04 11:32   ` Cornelia Huck
2016-11-07  9:11   ` Jason Wang
2016-11-04 11:01 ` Michael S. Tsirkin [this message]
2016-11-04 11:37   ` [Qemu-devel] [PATCH 2/2] virtio-net: mark VIRTIO_NET_F_GSO as legacy Cornelia Huck
2016-11-07  9:11   ` Jason Wang
2016-11-07 15:38   ` Dr. David Alan Gilbert
2016-11-07 19:43     ` Halil Pasic
2016-11-07 19:25   ` Halil Pasic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478257275-30365-3-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).