[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spe
From: |
Halil Pasic |
Subject: |
Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec |
Date: |
Tue, 21 Jul 2020 18:44:56 +0200 |
On Tue, 21 Jul 2020 09:40:10 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Fri, Jul 17, 2020 at 11:29:28AM +0200, Marc Hartmayer wrote:
> > Since virtio existed even before it got standardized, the virtio
> > standard defines the following types of virtio devices:
> >
> > + legacy device (pre-virtio 1.0)
> > + non-legacy or VIRTIO 1.0 device
> > + transitional device (which can act both as legacy and non-legacy)
> >
> > Virtio 1.0 defines the fields of the virtqueues as little endian,
> > while legacy uses guest's native endian [1]. Currently libvhost-user
> > does not handle virtio endianness at all, i.e. it works only if the
> > native endianness matches with whatever is actually needed. That means
> > things break spectacularly on big-endian targets. Let us handle virtio
> > endianness for non-legacy as required by the virtio specification
> > [1]. We will fence non-legacy virtio devices with the upcoming patch.
> >
> > [1]
> > https://docs.oasis-open.org/virtio/virtio/v1.1/cs01/virtio-v1.1-cs01.html#x1-210003
> >
> > Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> >
> > ---
> > Note: As we don't support legacy virtio devices
>
> Who's "we" in this sentence? vhost user supports legacy generally ...
In that sentence "we" is the library "libvhost-user". I would like
to avoid s390x being an oddball regarding this. Marc's previous
version made an attempt at correct endianness handling for legacy
and non-legacy. That spawned a discussion on how we don't want
legacy devices in this context. This series makes what seemed to be the
consensus reached in that discussion explicit: namely that libvhost-user
does not support legacy-virtio.
Regards,
Halil
- [RFC v2 0/3] Enable virtio-fs on s390x, Marc Hartmayer, 2020/07/17
- [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Marc Hartmayer, 2020/07/17
- Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Stefan Hajnoczi, 2020/07/21
- Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Michael S. Tsirkin, 2020/07/21
- Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Marc Hartmayer, 2020/07/28
- Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Michael S. Tsirkin, 2020/07/29
- Re: [RFC v2 2/3] libvhost-user: handle endianness as mandated by the spec, Marc Hartmayer, 2020/07/29
[RFC v2 3/3] libvhost-user: fence legacy virtio devices, Marc Hartmayer, 2020/07/17
Re: [RFC v2 0/3] Enable virtio-fs on s390x, no-reply, 2020/07/17
Re: [RFC v2 0/3] Enable virtio-fs on s390x, no-reply, 2020/07/17