summaryrefslogtreecommitdiff
path: root/tests/libqos/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqos/virtio.h')
-rw-r--r--tests/libqos/virtio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h
index ac4669a11b..3397a080e9 100644
--- a/tests/libqos/virtio.h
+++ b/tests/libqos/virtio.h
@@ -89,6 +89,12 @@ struct QVirtioBus {
void (*virtqueue_kick)(QVirtioDevice *d, QVirtQueue *vq);
};
+static inline bool qvirtio_is_big_endian(QVirtioDevice *d)
+{
+ /* FIXME: virtio 1.0 is always little-endian */
+ return qtest_big_endian(global_qtest);
+}
+
static inline uint32_t qvring_size(uint32_t num, uint32_t align)
{
return ((sizeof(struct vring_desc) * num + sizeof(uint16_t) * (3 + num)