libqos: fix qvring_init()
PATCH 1/1 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 <[email protected]>
--- tests/libqos/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/libqos/virtio.c +1 -1
@@ -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 ); }
Signature · 1 line
2.5.5
Stefan Hajnoczi
AppliedQuoted 10 lines · Laurent Vivier
"vq->desc[i].addr" is a 64bit value,
so write it withwriteq(), notwritew().struct vring_desc { __virtio64 addr; __virtio32 len; __virtio16 flags; __virtio16 next; };
Quoted 4 lines
Signed-off-by Laurent Vivier <[email protected]>--- tests/libqos/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan