[RFC PATCH v1 0/3] virtio: early detect 'modern' virtio

Halil Pasic posted 3 patches 4 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211028220017.930806-1-pasic@linux.ibm.com
Maintainers: Halil Pasic <pasic@linux.ibm.com>, David Hildenbrand <david@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Cornelia Huck <cohuck@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
There is a newer version of this series
hw/s390x/virtio-ccw.c      |  3 +++
hw/virtio/virtio-pci.c     |  1 +
hw/virtio/virtio.c         | 12 ++++++++++++
include/hw/virtio/virtio.h |  1 +
4 files changed, 17 insertions(+)
[RFC PATCH v1 0/3] virtio: early detect 'modern' virtio
Posted by Halil Pasic 4 years, 3 months ago
This is an early RFC for a transport specific early detecton of
modern virtio, which is most relevant for transitional devices on big
endian platforms, when drivers access the config space before
FEATURES_OK is set.

The most important part that is missing here is fixing the problems that
arrise in the situation described in the previous paragraph, when the
config is managed by a vhost device (and thus outside QEMU).

This series was only lightly tested. 

Halil Pasic (3):
  virtio: introduce virtio_force_modern()
  virtio-ccw: use virtio_force_modern
  virtio-pci: use virtio_force_modern()

 hw/s390x/virtio-ccw.c      |  3 +++
 hw/virtio/virtio-pci.c     |  1 +
 hw/virtio/virtio.c         | 12 ++++++++++++
 include/hw/virtio/virtio.h |  1 +
 4 files changed, 17 insertions(+)


base-commit: 2c3e83f92d93fbab071b8a96b8ab769b01902475
-- 
2.25.1


Re: [RFC PATCH v1 0/3] virtio: early detect 'modern' virtio
Posted by Michael S. Tsirkin 4 years, 3 months ago
On Fri, Oct 29, 2021 at 12:00:14AM +0200, Halil Pasic wrote:
> This is an early RFC for a transport specific early detecton of
> modern virtio, which is most relevant for transitional devices on big
> endian platforms, when drivers access the config space before
> FEATURES_OK is set.
> 
> The most important part that is missing here is fixing the problems that
> arrise in the situation described in the previous paragraph, when the
> config is managed by a vhost device (and thus outside QEMU).
> 
> This series was only lightly tested. 

I think it's a good enough approach, and we are getting close
to release. For vhost - a new callback just for that? Would be ok.
Or just invoke set features - if this works.


> Halil Pasic (3):
>   virtio: introduce virtio_force_modern()
>   virtio-ccw: use virtio_force_modern
>   virtio-pci: use virtio_force_modern()
> 
>  hw/s390x/virtio-ccw.c      |  3 +++
>  hw/virtio/virtio-pci.c     |  1 +
>  hw/virtio/virtio.c         | 12 ++++++++++++
>  include/hw/virtio/virtio.h |  1 +
>  4 files changed, 17 insertions(+)
> 
> 
> base-commit: 2c3e83f92d93fbab071b8a96b8ab769b01902475
> -- 
> 2.25.1


Re: [RFC PATCH v1 0/3] virtio: early detect 'modern' virtio
Posted by Halil Pasic 4 years, 3 months ago
On Fri, 5 Nov 2021 03:42:33 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> > This series was only lightly tested.   
> 
> I think it's a good enough approach, and we are getting close
> to release. For vhost - a new callback just for that? Would be ok.
> Or just invoke set features - if this works.

As of today I'm back from vacation. I intend to handle this
problem/series with priority.

Regards,
Halil