diff mbox series

[RFC,4/4] HACK: Hard-code the libvhost-user.o-cflags for s390x

Message ID 20200625100430.22407-5-mhartmay@linux.ibm.com
State New
Headers show
Series [RFC,1/4] virtio: add vhost-user-fs-ccw device | expand

Commit Message

Marc Hartmayer June 25, 2020, 10:04 a.m. UTC
This patch exists only to show the actual problem that libvhost-user
and it's users are architecture dependent as soon as we're trying to
support legacy virtio.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
---
 Makefile.objs                           | 1 +
 contrib/libvhost-user/libvhost-access.h | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/Makefile.objs b/Makefile.objs
index 7ce2588b89a3..abfb1912e456 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -111,6 +111,7 @@  elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
 libvhost-user-obj-y = contrib/libvhost-user/
+libvhost-user.o-cflags += -iquote $(SRC_PATH)/s390x-softmmu -DNEED_CPU_H
 vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
 vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
diff --git a/contrib/libvhost-user/libvhost-access.h b/contrib/libvhost-user/libvhost-access.h
index a4fc334fe134..e9451ae0fbc6 100644
--- a/contrib/libvhost-user/libvhost-access.h
+++ b/contrib/libvhost-user/libvhost-access.h
@@ -5,10 +5,9 @@ 
 
 #include "libvhost-user.h"
 
-/* TODO attempt to use poisoned TARGET_PPC64/ARM */
-/* #if defined(TARGET_PPC64) || defined(TARGET_ARM) */
-/* #define LEGACY_VIRTIO_IS_BIENDIAN 1 */
-/* #endif */
+#if defined(TARGET_PPC64) || defined(TARGET_ARM)
+#define LEGACY_VIRTIO_IS_BIENDIAN 1
+#endif
 
 static inline bool vu_is_big_endian(VuDev *dev)
 {