virtio-access.h (f73ca7363440240b7ee5ee7f7ddb1c64751efb54) virtio-access.h (95129d6fc9ead97155627a4ca0cfd37282883658)
1/*
2 * Virtio Accessor Support: In case your target can change endian.
3 *
4 * Copyright IBM, Corp. 2013
5 *
6 * Authors:
7 * Rusty Russell <rusty@au.ibm.com>
8 *

--- 5 unchanged lines hidden (view full) ---

14 */
15#ifndef _QEMU_VIRTIO_ACCESS_H
16#define _QEMU_VIRTIO_ACCESS_H
17#include "hw/virtio/virtio.h"
18#include "exec/address-spaces.h"
19
20static inline bool virtio_access_is_big_endian(VirtIODevice *vdev)
21{
1/*
2 * Virtio Accessor Support: In case your target can change endian.
3 *
4 * Copyright IBM, Corp. 2013
5 *
6 * Authors:
7 * Rusty Russell <rusty@au.ibm.com>
8 *

--- 5 unchanged lines hidden (view full) ---

14 */
15#ifndef _QEMU_VIRTIO_ACCESS_H
16#define _QEMU_VIRTIO_ACCESS_H
17#include "hw/virtio/virtio.h"
18#include "exec/address-spaces.h"
19
20static inline bool virtio_access_is_big_endian(VirtIODevice *vdev)
21{
22 if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
22 if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
23 /* Devices conforming to VIRTIO 1.0 or later are always LE. */
24 return false;
25 }
26#if defined(TARGET_IS_BIENDIAN)
27 return virtio_is_big_endian(vdev);
28#elif defined(TARGET_WORDS_BIGENDIAN)
29 return true;
30#else

--- 166 unchanged lines hidden ---
23 /* Devices conforming to VIRTIO 1.0 or later are always LE. */
24 return false;
25 }
26#if defined(TARGET_IS_BIENDIAN)
27 return virtio_is_big_endian(vdev);
28#elif defined(TARGET_WORDS_BIGENDIAN)
29 return true;
30#else

--- 166 unchanged lines hidden ---