From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJRH-0001Dd-HE for qemu-devel@nongnu.org; Wed, 28 Sep 2016 14:18:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpJRC-0006cO-H6 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 14:18:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJRC-0006cE-B6 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 14:18:34 -0400 From: Stefan Hajnoczi Date: Wed, 28 Sep 2016 19:15:34 +0100 Message-Id: <1475086537-31704-5-git-send-email-stefanha@redhat.com> In-Reply-To: <1475086537-31704-1-git-send-email-stefanha@redhat.com> References: <1475086537-31704-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 4/7] libqos: fix qvring_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Laurent Vivier , Stefan Hajnoczi From: Laurent Vivier "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 Message-id: 1474903450-9605-1-git-send-email-lvivier@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.7.4