[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace |
Date: |
Fri, 22 Jun 2018 10:46:10 -0300 |
hw_error() is only meant for CPU errors (since it dumps the CPU state).
Suggested-by: Thomas Huth <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
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
- [Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace,
Philippe Mathieu-Daudé <=