From c02d7030c3c538312c7f464cb79b72c29a20df74 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Tue, 31 May 2016 10:09:54 +0200 Subject: virtio: move bi-endian target support to a single location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Paolo's recent cpu.h cleanups broke legacy virtio for ppc64 LE guests (and arm BE guests as well, even if I have not verified that). Especially, commit "33c11879fd42 qemu-common: push cpu.h inclusion out of qemu-common.h" has the side-effect of silently hiding the TARGET_IS_BIENDIAN macro from the virtio memory accessors, and thus fully disabling support of endian changing targets. To be sure this cannot happen again, let's gather all the bi-endian bits where they belong in include/hw/virtio/virtio-access.h. The changes in hw/virtio/vhost.c are safe because vhost_needs_vring_endian() is not called on a hot path and non bi-endian targets will return false anyway. While here, also rename TARGET_IS_BIENDIAN to be more precise: it is only for legacy virtio and bi-endian guests. Signed-off-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Cédric Le Goater Reviewed-by: Paolo Bonzini --- target-ppc/cpu.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'target-ppc') 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. */ -- cgit v1.2.1