qemu-e2k/contrib
Marc Hartmayer 2ffc547080 libvhost-user: handle endianness as mandated by the spec
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]
and fence legacy virtio, as there is no safe way to figure out the
needed endianness conversions for all cases. 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

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Message-id: 20200901150019.29229-3-mhartmay@linux.ibm.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-09-23 13:41:58 +01:00
..
elf2dmp contrib/elf2dmp: convert to meson 2020-08-21 06:30:11 -04:00
gitdm contrib/: fix some comment spelling errors 2020-09-17 20:41:44 +02:00
ivshmem-client contrib/: fix some comment spelling errors 2020-09-17 20:41:44 +02:00
ivshmem-server contrib/ivshmem: convert to meson 2020-08-21 06:30:11 -04:00
libvhost-user libvhost-user: handle endianness as mandated by the spec 2020-09-23 13:41:58 +01:00
plugins plugins: move the more involved plugins to contrib 2020-09-10 10:47:03 +01:00
rdmacm-mux contrib/rdmacm-mux: convert to Meson 2020-08-21 06:30:10 -04:00
systemd contrib: add systemd unit files 2017-12-20 22:29:26 +01:00
vhost-user-blk contrib/vhost-user-blk: convert to Meson 2020-08-21 06:30:09 -04:00
vhost-user-gpu meson: use meson datadir instead of qemu_datadir 2020-09-01 08:51:33 -04:00
vhost-user-input contrib/vhost-user-input: convert to meson 2020-08-21 06:30:10 -04:00
vhost-user-scsi contrib/vhost-user-scsi: convert to Meson 2020-08-21 06:30:09 -04:00