From: Marc Hartmayer <mhartmay@linux.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Marc Hartmayer <mhartmay@linux.ibm.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH 2/2] libvhost-user: handle endianness as mandated by the spec
Date: Mon, 03 Aug 2020 16:17:27 +0200 [thread overview]
Message-ID: <87wo2fhkzs.fsf@linux.ibm.com> (raw)
In-Reply-To: <20200802011240-mutt-send-email-mst@kernel.org>
On Sun, Aug 02, 2020 at 01:13 AM -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Thu, Jul 30, 2020 at 04:07:31PM +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]. The fencing of legacy virtio devices is done in
>> `vu_set_features_exec`.
>>
>> [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>
>
>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Thanks.
[…snip]
--
Kind regards / Beste Grüße
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2020-08-03 14:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 14:07 [PATCH 0/2] Enable virtio-fs on s390x Marc Hartmayer
2020-07-30 14:07 ` [PATCH 1/2] virtio: add vhost-user-fs-ccw device Marc Hartmayer
2020-07-30 15:19 ` Cornelia Huck
2020-07-30 14:07 ` [PATCH 2/2] libvhost-user: handle endianness as mandated by the spec Marc Hartmayer
2020-08-02 5:13 ` Michael S. Tsirkin
2020-08-03 14:17 ` Marc Hartmayer [this message]
2020-08-03 9:26 ` Cornelia Huck
2020-08-21 8:50 ` Marc Hartmayer
2020-08-02 5:13 ` [PATCH 0/2] Enable virtio-fs on s390x Michael S. Tsirkin
2020-08-04 11:29 ` Dr. David Alan Gilbert
2020-08-27 12:19 ` Michael S. Tsirkin
2020-08-27 12:26 ` Cornelia Huck
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=87wo2fhkzs.fsf@linux.ibm.com \
--to=mhartmay@linux.ibm.com \
--cc=berrange@redhat.com \
--cc=cohuck@redhat.com \
--cc=dgilbert@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 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.