[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/7] libqos: fix qvring_init()
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 4/7] libqos: fix qvring_init() |
Date: |
Wed, 28 Sep 2016 19:15:34 +0100 |
From: Laurent Vivier <address@hidden>
"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 <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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
- [Qemu-devel] [PULL 0/7] Block patches, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 1/7] block: mirror: fix wrong comment of mirror_start, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 2/7] aio-posix: avoid unnecessary aio_epoll_enabled() calls, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 5/7] coroutine: add qemu_coroutine_entered() function, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 7/7] linux-aio: fix re-entrant completion processing, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 4/7] libqos: fix qvring_init(),
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 3/7] iothread: check iothread->ctx before aio_context_unref to avoid assertion, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 6/7] test-coroutine: test qemu_coroutine_entered(), Stefan Hajnoczi, 2016/09/28
- Re: [Qemu-devel] [PULL 0/7] Block patches, Peter Maydell, 2016/09/28