diff options
-rw-r--r-- | include/qom/cpu.h | 1 | ||||
-rw-r--r-- | qom/cpu.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 4b352a28fa..1aafbf5f34 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, @@ -196,6 +196,11 @@ static int cpu_common_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg) return 0; } +bool target_words_bigendian(void); +static bool cpu_common_virtio_is_big_endian(CPUState *cpu) +{ + return target_words_bigendian(); +} void cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags) @@ -334,6 +339,7 @@ static void cpu_class_init(ObjectClass *klass, void *data) k->write_elf64_note = cpu_common_write_elf64_note; k->gdb_read_register = cpu_common_gdb_read_register; k->gdb_write_register = cpu_common_gdb_write_register; + k->virtio_is_big_endian = cpu_common_virtio_is_big_endian; dc->realize = cpu_common_realizefn; /* * Reason: CPUs still need special care by board code: wiring up |