aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2016-09-26 17:24:10 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2016-09-28 11:21:46 +0100
commit844c82296f8bd6ceff8d170f3740740f3ce84b73 (patch)
tree03d6f6f8a5340a66e71620904ae8e0abe0db2a3a /tests/libqos
parenteb7b5c35117bfb90dcfa881a0e3b23368c73fba6 (diff)
downloadqemu-844c82296f8bd6ceff8d170f3740740f3ce84b73.zip
qemu-844c82296f8bd6ceff8d170f3740740f3ce84b73.tar.gz
qemu-844c82296f8bd6ceff8d170f3740740f3ce84b73.tar.bz2
libqos: fix qvring_init()
"vq->desc[i].addr" is a 64bit value, so write it with writeq(), not writew(). struct vring_desc { __virtio64 addr; __virtio32 len; __virtio16 flags; __virtio16 next; }; Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-id: 1474903450-9605-1-git-send-email-lvivier@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos')
-rw-r--r--tests/libqos/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c
index 37ff860..105bcce 100644
--- a/tests/libqos/virtio.c
+++ b/tests/libqos/virtio.c
@@ -147,7 +147,7 @@ void qvring_init(const QGuestAllocator *alloc, QVirtQueue *vq, uint64_t addr)
for (i = 0; i < vq->size - 1; i++) {
/* vq->desc[i].addr */
- writew(vq->desc + (16 * i), 0);
+ writeq(vq->desc + (16 * i), 0);
/* vq->desc[i].next */
writew(vq->desc + (16 * i) + 14, i + 1);
}