提交 844c8229 编写于 作者: L Laurent Vivier 提交者: Stefan Hajnoczi

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: NLaurent Vivier <lvivier@redhat.com>
Message-id: 1474903450-9605-1-git-send-email-lvivier@redhat.com
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 eb7b5c35
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册