qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Lei Yang" <leiyang@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] virtio-net: not enable vq reset feature unconditionally
Date: Mon, 8 May 2023 02:48:01 -0400	[thread overview]
Message-ID: <20230508024746-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEubjEr_CSxdq86jZsYY8a78L50N03=vnYzgOhKBNH29ag@mail.gmail.com>

On Mon, May 08, 2023 at 02:44:21PM +0800, Jason Wang wrote:
> On Sun, May 7, 2023 at 2:01 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Sat, May 06, 2023 at 10:13:36AM +0800, Xuan Zhuo wrote:
> > > On Thu,  4 May 2023 12:14:47 +0200, =?utf-8?q?Eugenio_P=C3=A9rez?= <eperezma@redhat.com> wrote:
> > > > The commit 93a97dc5200a ("virtio-net: enable vq reset feature") enables
> > > > unconditionally vq reset feature as long as the device is emulated.
> > > > This makes impossible to actually disable the feature, and it causes
> > > > migration problems from qemu version previous than 7.2.
> > > >
> > > > The entire final commit is unneeded as device system already enable or
> > > > disable the feature properly.
> > > >
> > > > This reverts commit 93a97dc5200a95e63b99cb625f20b7ae802ba413.
> > > > Fixes: 93a97dc5200a ("virtio-net: enable vq reset feature")
> > > > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > > >
> > > > ---
> > > > Tested by checking feature bit at  /sys/devices/pci.../virtio0/features
> > > > enabling and disabling queue_reset virtio-net feature and vhost=on/off
> > > > on net device backend.
> > >
> > > Do you mean that this feature cannot be closed?
> > >
> > > I tried to close in the guest, it was successful.
> > >
> > > In addition, in this case, could you try to repair the problem instead of
> > > directly revert.
> > >
> > > Thanks.
> >
> > What does you patch accomplish though? If it's not needed
> > let's not do it.
> 
> It looks to me the unconditional set of this feature breaks the
> migration of pre 7.2 machines.
> 
> Also we probably need to make ring_reset as false by default, or
> compat it for pre 7.2 machines.
> 
>     DEFINE_PROP_BIT64("queue_reset", _state, _field, \
>                       VIRTIO_F_RING_RESET, true)
> 
> 
> Thanks

Compat I am guessing. Eugenio?

> >
> > > > ---
> > > >  hw/net/virtio-net.c | 1 -
> > > >  1 file changed, 1 deletion(-)
> > > >
> > > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> > > > index 53e1c32643..4ea33b6e2e 100644
> > > > --- a/hw/net/virtio-net.c
> > > > +++ b/hw/net/virtio-net.c
> > > > @@ -805,7 +805,6 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
> > > >      }
> > > >
> > > >      if (!get_vhost_net(nc->peer)) {
> > > > -        virtio_add_feature(&features, VIRTIO_F_RING_RESET);
> > > >          return features;
> > > >      }
> > > >
> > > > --
> > > > 2.31.1
> > > >
> >



  reply	other threads:[~2023-05-08  6:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 10:14 [PATCH] virtio-net: not enable vq reset feature unconditionally Eugenio Pérez
2023-05-06  2:13 ` Xuan Zhuo
2023-05-07  6:01   ` Michael S. Tsirkin
2023-05-08  6:44     ` Jason Wang
2023-05-08  6:48       ` Michael S. Tsirkin [this message]
2023-05-08  7:49       ` Xuan Zhuo
2023-05-08  9:09   ` Eugenio Perez Martin
2023-05-08  9:44     ` Xuan Zhuo
2023-05-08 10:22     ` Michael S. Tsirkin
2023-05-08 17:31       ` Eugenio Perez Martin
2023-05-08 18:11         ` Michael S. Tsirkin
2023-05-09  8:33           ` Eugenio Perez Martin
2023-05-09  3:13         ` Jason Wang

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=20230508024746-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=leiyang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /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).