aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/virtio/vhost.c4
-rw-r--r--include/hw/virtio/virtio-access.h6
-rw-r--r--target-arm/cpu.h2
-rw-r--r--target-ppc/cpu.h2
4 files changed, 5 insertions, 9 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 4400718154..81cc5b0ae3 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -767,15 +767,11 @@ static inline bool vhost_needs_vring_endian(VirtIODevice *vdev)
if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
return false;
}
-#ifdef TARGET_IS_BIENDIAN
#ifdef HOST_WORDS_BIGENDIAN
return vdev->device_endian == VIRTIO_DEVICE_ENDIAN_LITTLE;
#else
return vdev->device_endian == VIRTIO_DEVICE_ENDIAN_BIG;
#endif
-#else
- return false;
-#endif
}
static int vhost_virtqueue_set_vring_endian_legacy(struct vhost_dev *dev,
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 8dc84f5203..4b28038146 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -17,9 +17,13 @@
#include "hw/virtio/virtio.h"
#include "exec/address-spaces.h"
+#if defined(TARGET_PPC64) || defined(TARGET_ARM)
+#define LEGACY_VIRTIO_IS_BIENDIAN 1
+#endif
+
static inline bool virtio_access_is_big_endian(VirtIODevice *vdev)
{
-#if defined(TARGET_IS_BIENDIAN)
+#if defined(LEGACY_VIRTIO_IS_BIENDIAN)
return virtio_is_big_endian(vdev);
#elif defined(TARGET_WORDS_BIGENDIAN)
if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 401955f825..17d80510da 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -29,8 +29,6 @@
# define TARGET_LONG_BITS 32
#endif
-#define TARGET_IS_BIENDIAN 1
-
#define CPUArchState struct CPUARMState
#include "qemu-common.h"
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 98a24a50f3..db7ee0c74d 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -28,8 +28,6 @@
#define TARGET_LONG_BITS 64
#define TARGET_PAGE_BITS 12
-#define TARGET_IS_BIENDIAN 1
-
/* Note that the official physical address space bits is 62-M where M
is implementation dependent. I've not looked up M for the set of
cpus we emulate at the system level. */