All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio: remove the excess virtio features check
@ 2022-11-09 11:10 Xuan Zhuo
  2022-11-09 14:46 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Xuan Zhuo @ 2022-11-09 11:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S. Tsirkin, stefanha, lersek, jasowang, peter.maydell, kraxel

In virtio_queue_enable(), we checked virtio feature VIRTIO_F_VERSION_1.

This check is not necessary, and conflict with SeaBIOS. The problem
appeared in SeaBIOS. But we also remove this check.

Link: https://www.mail-archive.com/qemu-devel@nongnu.org/msg920538.html
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
 hw/virtio/virtio.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 9683b2e158..701e23ea6a 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2499,11 +2499,6 @@ void virtio_queue_enable(VirtIODevice *vdev, uint32_t queue_index)
 {
     VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
 
-    if (!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
-        error_report("queue_enable is only suppported in devices of virtio "
-                     "1.0 or later.");
-    }
-
     if (k->queue_enable) {
         k->queue_enable(vdev, queue_index);
     }
-- 
2.32.0.3.g01195cf9f



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio: remove the excess virtio features check
  2022-11-09 11:10 [PATCH] virtio: remove the excess virtio features check Xuan Zhuo
@ 2022-11-09 14:46 ` Michael S. Tsirkin
  2022-11-10  2:12   ` Xuan Zhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-11-09 14:46 UTC (permalink / raw)
  To: Xuan Zhuo; +Cc: qemu-devel, stefanha, lersek, jasowang, peter.maydell, kraxel

On Wed, Nov 09, 2022 at 07:10:21PM +0800, Xuan Zhuo wrote:
> In virtio_queue_enable(), we checked virtio feature VIRTIO_F_VERSION_1.
> 
> This check is not necessary, and conflict with SeaBIOS. The problem
> appeared in SeaBIOS. But we also remove this check.
> 
> Link: https://www.mail-archive.com/qemu-devel@nongnu.org/msg920538.html
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> ---
>  hw/virtio/virtio.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 9683b2e158..701e23ea6a 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -2499,11 +2499,6 @@ void virtio_queue_enable(VirtIODevice *vdev, uint32_t queue_index)
>  {
>      VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
>  
> -    if (!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> -        error_report("queue_enable is only suppported in devices of virtio "
> -                     "1.0 or later.");
> -    }
> -
>      if (k->queue_enable) {
>          k->queue_enable(vdev, queue_index);
>      }

Well this warning turned out to be actually useful.
Let's see whether we can fix seabios in time for release.
If yes I would just make it LOG_GUEST_ERR and limit to
latest machine type but not drop completely.

> -- 
> 2.32.0.3.g01195cf9f



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio: remove the excess virtio features check
  2022-11-09 14:46 ` Michael S. Tsirkin
@ 2022-11-10  2:12   ` Xuan Zhuo
  0 siblings, 0 replies; 3+ messages in thread
From: Xuan Zhuo @ 2022-11-10  2:12 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: qemu-devel, stefanha, lersek, jasowang, peter.maydell, kraxel

On Wed, 9 Nov 2022 09:46:18 -0500, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Wed, Nov 09, 2022 at 07:10:21PM +0800, Xuan Zhuo wrote:
> > In virtio_queue_enable(), we checked virtio feature VIRTIO_F_VERSION_1.
> >
> > This check is not necessary, and conflict with SeaBIOS. The problem
> > appeared in SeaBIOS. But we also remove this check.
> >
> > Link: https://www.mail-archive.com/qemu-devel@nongnu.org/msg920538.html
> > Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> > ---
> >  hw/virtio/virtio.c | 5 -----
> >  1 file changed, 5 deletions(-)
> >
> > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> > index 9683b2e158..701e23ea6a 100644
> > --- a/hw/virtio/virtio.c
> > +++ b/hw/virtio/virtio.c
> > @@ -2499,11 +2499,6 @@ void virtio_queue_enable(VirtIODevice *vdev, uint32_t queue_index)
> >  {
> >      VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
> >
> > -    if (!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> > -        error_report("queue_enable is only suppported in devices of virtio "
> > -                     "1.0 or later.");
> > -    }
> > -
> >      if (k->queue_enable) {
> >          k->queue_enable(vdev, queue_index);
> >      }
>
> Well this warning turned out to be actually useful.
> Let's see whether we can fix seabios in time for release.
> If yes I would just make it LOG_GUEST_ERR and limit to
> latest machine type but not drop completely.

OK.


>
> > --
> > 2.32.0.3.g01195cf9f
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-10  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 11:10 [PATCH] virtio: remove the excess virtio features check Xuan Zhuo
2022-11-09 14:46 ` Michael S. Tsirkin
2022-11-10  2:12   ` Xuan Zhuo

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.