diff options
author | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2014-06-24 19:26:29 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-29 19:39:42 +0300 |
commit | 98ed8ecfc9dd9e22e4251251492f062dde32c3c4 (patch) | |
tree | a8bfe033572b936c256f7f62dd2ba93523190358 /include/hw | |
parent | 6b321a3df55de42ad349870a8793e33a69f9d1a3 (diff) |
exec: introduce target_words_bigendian() helper
We currently have a virtio_is_big_endian() helper that provides the target
endianness to the virtio code. As of today, the helper returns a fixed
compile-time value. Of course, this will have to change if we want to
support target endianness changes at run-time.
Let's move the TARGET_WORDS_BIGENDIAN bits out to a new helper and have
virtio_is_big_endian() implemented on top of it.
This patch doesn't change any functionality.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/virtio/virtio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 3505ce511e..9000ee2f50 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -255,4 +255,10 @@ void virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign, bool set_handler); void virtio_queue_notify_vq(VirtQueue *vq); void virtio_irq(VirtQueue *vq); + +bool target_words_bigendian(void); +static inline bool virtio_is_big_endian(void) +{ + return target_words_bigendian(); +} #endif |