hw_error() is only meant for CPU errors (since it dumps the CPU state). Suggested-by: Thomas Huth <th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- Thomas, do you think this is the correct place for this function?
$ git grep hw_error hw/ | wc -l 145 work to do... Patchew will throw many errors :) Change suggested here: http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06478.html include/exec/cpu-all.h | 9 +++++++++ include/hw/hw.h | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 7fa726b8e3..467026da1b 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -345,4 +345,13 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, int cpu_exec(CPUState *cpu); +/** + * hw_error: + * @fmt: printf-style format string + * @args: optional arguments for format string + * + * Report a CPU hardware error, dump the CPUs state, finally abort. + */ +void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); + #endif /* CPU_ALL_H */ diff --git a/include/hw/hw.h b/include/hw/hw.h index ab4950c312..65fa6d32f8 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -15,6 +15,4 @@ #include "qemu/module.h" #include "sysemu/reset.h" -void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); - #endif -- 2.18.0.rc2