From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kvm@vger.kernel.org, "Tiwei Bie" <tiwei.bie@intel.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
"Eugenio Pérez" <eperezma@redhat.com>
Subject: Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
Date: Tue, 6 Jun 2023 08:58:06 -0400 [thread overview]
Message-ID: <20230606085643-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEu3PqQ99UoKF5NHgVADD3q=BF6jhLiyumeT4S1QCqN1tw@mail.gmail.com>
On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote:
> On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella <sgarzare@redhat.com> wrote:
> >
> > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote:
> > >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote:
> > >> On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wrote:
> > >> > On Mon, Jun 05, 2023 at 02:54:20PM +0200, Stefano Garzarella wrote:
> > >> > > On Mon, Jun 05, 2023 at 08:41:54AM -0400, Michael S. Tsirkin wrote:
> > >> > > > On Mon, Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote:
> > >> > > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE)
> > >> > > > > don't support packed virtqueue well yet, so let's filter the
> > >> > > > > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features().
> > >> > > > >
> > >> > > > > This way, even if the device supports it, we don't risk it being
> > >> > > > > negotiated, then the VMM is unable to set the vring state properly.
> > >> > > > >
> > >> > > > > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
> > >> > > > > Cc: stable@vger.kernel.org
> > >> > > > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> > >> > > > > ---
> > >> > > > >
> > >> > > > > Notes:
> > >> > > > > This patch should be applied before the "[PATCH v2 0/3] vhost_vdpa:
> > >> > > > > better PACKED support" series [1] and backported in stable branches.
> > >> > > > >
> > >> > > > > We can revert it when we are sure that everything is working with
> > >> > > > > packed virtqueues.
> > >> > > > >
> > >> > > > > Thanks,
> > >> > > > > Stefano
> > >> > > > >
> > >> > > > > [1] https://lore.kernel.org/virtualization/20230424225031.18947-1-shannon.nelson@amd.com/
> > >> > > >
> > >> > > > I'm a bit lost here. So why am I merging "better PACKED support" then?
> > >> > >
> > >> > > To really support packed virtqueue with vhost-vdpa, at that point we would
> > >> > > also have to revert this patch.
> > >> > >
> > >> > > I wasn't sure if you wanted to queue the series for this merge window.
> > >> > > In that case do you think it is better to send this patch only for stable
> > >> > > branches?
> > >> > > > Does this patch make them a NOP?
> > >> > >
> > >> > > Yep, after applying the "better PACKED support" series and being
> > >> > > sure that
> > >> > > the IOCTLs of vhost-vdpa support packed virtqueue, we should revert this
> > >> > > patch.
> > >> > >
> > >> > > Let me know if you prefer a different approach.
> > >> > >
> > >> > > I'm concerned that QEMU uses vhost-vdpa IOCTLs thinking that the kernel
> > >> > > interprets them the right way, when it does not.
> > >> > >
> > >> > > Thanks,
> > >> > > Stefano
> > >> > >
> > >> >
> > >> > If this fixes a bug can you add Fixes tags to each of them? Then it's ok
> > >> > to merge in this window. Probably easier than the elaborate
> > >> > mask/unmask dance.
> > >>
> > >> CCing Shannon (the original author of the "better PACKED support"
> > >> series).
> > >>
> > >> IIUC Shannon is going to send a v3 of that series to fix the
> > >> documentation, so Shannon can you also add the Fixes tags?
> > >>
> > >> Thanks,
> > >> Stefano
> > >
> > >Well this is in my tree already. Just reply with
> > >Fixes: <>
> > >to each and I will add these tags.
> >
> > I tried, but it is not easy since we added the support for packed
> > virtqueue in vdpa and vhost incrementally.
> >
> > Initially I was thinking of adding the same tag used here:
> >
> > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
> >
> > Then I discovered that vq_state wasn't there, so I was thinking of
> >
> > Fixes: 530a5678bc00 ("vdpa: support packed virtqueue for set/get_vq_state()")
> >
> > So we would have to backport quite a few patches into the stable branches.
> > I don't know if it's worth it...
> >
> > I still think it is better to disable packed in the stable branches,
> > otherwise I have to make a list of all the patches we need.
> >
> > Any other ideas?
>
> AFAIK, except for vp_vdpa, pds seems to be the first parent that
> supports packed virtqueue. Users should not notice anything wrong if
> they don't use packed virtqueue. And the problem of vp_vdpa + packed
> virtqueue came since the day0 of vp_vdpa. It seems fine to do nothing
> I guess.
>
> Thanks
I have a question though, what if down the road there
is a new feature that needs more changes? It will be
broken too just like PACKED no?
Shouldn't vdpa have an allowlist of features it knows how
to support?
> >
> > Thanks,
> > Stefano
> >
> >
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: "Stefano Garzarella" <sgarzare@redhat.com>,
"Shannon Nelson" <shannon.nelson@amd.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, "Eugenio Pérez" <eperezma@redhat.com>,
"Tiwei Bie" <tiwei.bie@intel.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature
Date: Tue, 6 Jun 2023 08:58:06 -0400 [thread overview]
Message-ID: <20230606085643-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEu3PqQ99UoKF5NHgVADD3q=BF6jhLiyumeT4S1QCqN1tw@mail.gmail.com>
On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote:
> On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella <sgarzare@redhat.com> wrote:
> >
> > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote:
> > >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote:
> > >> On Mon, Jun 05, 2023 at 09:00:25AM -0400, Michael S. Tsirkin wrote:
> > >> > On Mon, Jun 05, 2023 at 02:54:20PM +0200, Stefano Garzarella wrote:
> > >> > > On Mon, Jun 05, 2023 at 08:41:54AM -0400, Michael S. Tsirkin wrote:
> > >> > > > On Mon, Jun 05, 2023 at 01:06:44PM +0200, Stefano Garzarella wrote:
> > >> > > > > vhost-vdpa IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE)
> > >> > > > > don't support packed virtqueue well yet, so let's filter the
> > >> > > > > VIRTIO_F_RING_PACKED feature for now in vhost_vdpa_get_features().
> > >> > > > >
> > >> > > > > This way, even if the device supports it, we don't risk it being
> > >> > > > > negotiated, then the VMM is unable to set the vring state properly.
> > >> > > > >
> > >> > > > > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
> > >> > > > > Cc: stable@vger.kernel.org
> > >> > > > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> > >> > > > > ---
> > >> > > > >
> > >> > > > > Notes:
> > >> > > > > This patch should be applied before the "[PATCH v2 0/3] vhost_vdpa:
> > >> > > > > better PACKED support" series [1] and backported in stable branches.
> > >> > > > >
> > >> > > > > We can revert it when we are sure that everything is working with
> > >> > > > > packed virtqueues.
> > >> > > > >
> > >> > > > > Thanks,
> > >> > > > > Stefano
> > >> > > > >
> > >> > > > > [1] https://lore.kernel.org/virtualization/20230424225031.18947-1-shannon.nelson@amd.com/
> > >> > > >
> > >> > > > I'm a bit lost here. So why am I merging "better PACKED support" then?
> > >> > >
> > >> > > To really support packed virtqueue with vhost-vdpa, at that point we would
> > >> > > also have to revert this patch.
> > >> > >
> > >> > > I wasn't sure if you wanted to queue the series for this merge window.
> > >> > > In that case do you think it is better to send this patch only for stable
> > >> > > branches?
> > >> > > > Does this patch make them a NOP?
> > >> > >
> > >> > > Yep, after applying the "better PACKED support" series and being
> > >> > > sure that
> > >> > > the IOCTLs of vhost-vdpa support packed virtqueue, we should revert this
> > >> > > patch.
> > >> > >
> > >> > > Let me know if you prefer a different approach.
> > >> > >
> > >> > > I'm concerned that QEMU uses vhost-vdpa IOCTLs thinking that the kernel
> > >> > > interprets them the right way, when it does not.
> > >> > >
> > >> > > Thanks,
> > >> > > Stefano
> > >> > >
> > >> >
> > >> > If this fixes a bug can you add Fixes tags to each of them? Then it's ok
> > >> > to merge in this window. Probably easier than the elaborate
> > >> > mask/unmask dance.
> > >>
> > >> CCing Shannon (the original author of the "better PACKED support"
> > >> series).
> > >>
> > >> IIUC Shannon is going to send a v3 of that series to fix the
> > >> documentation, so Shannon can you also add the Fixes tags?
> > >>
> > >> Thanks,
> > >> Stefano
> > >
> > >Well this is in my tree already. Just reply with
> > >Fixes: <>
> > >to each and I will add these tags.
> >
> > I tried, but it is not easy since we added the support for packed
> > virtqueue in vdpa and vhost incrementally.
> >
> > Initially I was thinking of adding the same tag used here:
> >
> > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
> >
> > Then I discovered that vq_state wasn't there, so I was thinking of
> >
> > Fixes: 530a5678bc00 ("vdpa: support packed virtqueue for set/get_vq_state()")
> >
> > So we would have to backport quite a few patches into the stable branches.
> > I don't know if it's worth it...
> >
> > I still think it is better to disable packed in the stable branches,
> > otherwise I have to make a list of all the patches we need.
> >
> > Any other ideas?
>
> AFAIK, except for vp_vdpa, pds seems to be the first parent that
> supports packed virtqueue. Users should not notice anything wrong if
> they don't use packed virtqueue. And the problem of vp_vdpa + packed
> virtqueue came since the day0 of vp_vdpa. It seems fine to do nothing
> I guess.
>
> Thanks
I have a question though, what if down the road there
is a new feature that needs more changes? It will be
broken too just like PACKED no?
Shouldn't vdpa have an allowlist of features it knows how
to support?
> >
> > Thanks,
> > Stefano
> >
> >
next prev parent reply other threads:[~2023-06-06 12:58 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 11:06 [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature Stefano Garzarella
2023-06-05 11:06 ` Stefano Garzarella
2023-06-05 12:41 ` Michael S. Tsirkin
2023-06-05 12:41 ` Michael S. Tsirkin
2023-06-05 12:54 ` Stefano Garzarella
2023-06-05 12:54 ` Stefano Garzarella
2023-06-05 13:00 ` Michael S. Tsirkin
2023-06-05 13:00 ` Michael S. Tsirkin
2023-06-05 13:30 ` Stefano Garzarella
2023-06-05 13:30 ` Stefano Garzarella
2023-06-05 13:54 ` Michael S. Tsirkin
2023-06-05 13:54 ` Michael S. Tsirkin
2023-06-05 14:56 ` Stefano Garzarella
2023-06-05 14:56 ` Stefano Garzarella
2023-06-05 21:44 ` Michael S. Tsirkin
2023-06-05 21:44 ` Michael S. Tsirkin
2023-06-06 10:09 ` Stefano Garzarella
2023-06-06 10:09 ` Stefano Garzarella
2023-06-07 20:52 ` Michael S. Tsirkin
2023-06-07 20:52 ` Michael S. Tsirkin
2023-06-06 1:29 ` Jason Wang
2023-06-06 1:29 ` Jason Wang
2023-06-06 10:18 ` Stefano Garzarella
2023-06-06 10:18 ` Stefano Garzarella
2023-06-06 12:58 ` Michael S. Tsirkin [this message]
2023-06-06 12:58 ` Michael S. Tsirkin
2023-06-07 8:39 ` Stefano Garzarella
2023-06-07 8:39 ` Stefano Garzarella
2023-06-07 9:43 ` Michael S. Tsirkin
2023-06-07 9:43 ` Michael S. Tsirkin
2023-06-08 0:42 ` Jason Wang
2023-06-08 0:42 ` Jason Wang
2023-06-08 6:03 ` Michael S. Tsirkin
2023-06-08 6:03 ` Michael S. Tsirkin
2023-06-08 7:46 ` Jason Wang
2023-06-08 7:46 ` Jason Wang
2023-06-08 7:59 ` Stefano Garzarella
2023-06-08 7:59 ` Stefano Garzarella
2023-06-08 9:00 ` Jason Wang
2023-06-08 9:00 ` Jason Wang
2023-06-08 9:21 ` Stefano Garzarella
2023-06-08 9:21 ` Stefano Garzarella
2023-06-08 9:29 ` Jason Wang
2023-06-08 9:29 ` Jason Wang
2023-06-08 9:47 ` Stefano Garzarella
2023-06-08 9:47 ` Stefano Garzarella
2023-06-08 14:23 ` Michael S. Tsirkin
2023-06-08 14:23 ` Michael S. Tsirkin
2023-06-09 2:16 ` Jason Wang
2023-06-09 2:16 ` Jason Wang
2023-06-09 7:17 ` Michael S. Tsirkin
2023-06-09 7:17 ` Michael S. Tsirkin
2023-06-09 7:37 ` Stefano Garzarella
2023-06-09 7:37 ` Stefano Garzarella
2023-06-08 13:46 ` Michael S. Tsirkin
2023-06-08 13:46 ` Michael S. Tsirkin
2023-06-08 13:43 ` Michael S. Tsirkin
2023-06-08 13:43 ` Michael S. Tsirkin
2023-06-22 11:37 ` Michael S. Tsirkin
2023-06-22 11:37 ` Michael S. Tsirkin
2023-06-22 12:28 ` Stefano Garzarella
2023-06-22 12:28 ` Stefano Garzarella
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=20230606085643-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tiwei.bie@intel.com \
--cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.