From bccd82b4073b7242876480d7f4d93bd281feb548 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 23 Oct 2019 11:04:18 +0100 Subject: 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 Reviewed-by: Thomas Huth Message-Id: <20191023100425.12168-10-stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/libqos/virtio-pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/libqos/virtio-pci.c') diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c index 1b6b760..7ecf5d0 100644 --- a/tests/libqos/virtio-pci.c +++ b/tests/libqos/virtio-pci.c @@ -217,6 +217,7 @@ static QVirtQueue *qvirtio_pci_virtqueue_setup(QVirtioDevice *d, feat = qvirtio_pci_get_guest_features(d); qvirtio_pci_queue_select(d, index); + vqpci->vq.vdev = d; vqpci->vq.index = index; vqpci->vq.size = qvirtio_pci_get_queue_size(d); vqpci->vq.free_head = 0; -- cgit v1.1