libqos: access VIRTIO 1.0 vring in little-endian
commitbccd82b4073b7242876480d7f4d93bd281feb548
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 23 Oct 2019 10:04:18 +0000 (23 11:04 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 25 Oct 2019 11:46:22 +0000 (25 07:46 -0400)
tree998a46986ab0ddcab96e82455a8cb5f9c1c2172b
parentc0f79698ed562814158d9652a29e77c97cc074f6
libqos: access VIRTIO 1.0 vring in little-endian

VIRTIO 1.0 uses little-endian for the vring.  Legacy VIRTIO uses guest
endianness.  Adjust the code to handle both.

Note that qvirtio_readq() is not defined because it has no users.  All
the other accessors are really needed.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20191023100425.12168-10-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/libqos/virtio-mmio.c
tests/libqos/virtio-pci.c
tests/libqos/virtio.c
tests/libqos/virtio.h
tests/virtio-blk-test.c