aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kurz <gkurz@linux.vnet.ibm.com>2014-06-24 19:33:21 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-06-29 19:39:42 +0300
commitbf7663c4bd8f8f619d6dbb5780025d92ace250a8 (patch)
treec79ad18b6630f97ac5c0f3e9aec336f9496d76dc /include
parent98ed8ecfc9dd9e22e4251251492f062dde32c3c4 (diff)
downloadqemu-bf7663c4bd8f8f619d6dbb5780025d92ace250a8.zip
qemu-bf7663c4bd8f8f619d6dbb5780025d92ace250a8.tar.gz
qemu-bf7663c4bd8f8f619d6dbb5780025d92ace250a8.tar.bz2
cpu: introduce CPUClass::virtio_is_big_endian()
If we want to support targets that can change endianness (modern PPC and ARM for the moment), we need to add a per-CPU class method to be called from the virtio code. The virtio_ prefix in the name is a hint for people to avoid misusage (aka. anywhere but from the virtio code). The default behaviour is to return the compile-time default target endianness. Suggested-by: Peter Maydell <peter.maydell@linaro.org> 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')
-rw-r--r--include/qom/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 4b352a2..1aafbf5 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -116,6 +116,7 @@ typedef struct CPUClass {
CPUUnassignedAccess do_unassigned_access;
void (*do_unaligned_access)(CPUState *cpu, vaddr addr,
int is_write, int is_user, uintptr_t retaddr);
+ bool (*virtio_is_big_endian)(CPUState *cpu);
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
uint8_t *buf, int len, bool is_write);
void (*dump_state)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,