From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Thomas Huth <thuth@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>
Subject: [Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace
Date: Fri, 22 Jun 2018 10:46:10 -0300 [thread overview]
Message-ID: <20180622134610.23713-1-f4bug@amsat.org> (raw)
hw_error() is only meant for CPU errors (since it dumps the CPU state).
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@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
next reply other threads:[~2018-06-22 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 13:46 Philippe Mathieu-Daudé [this message]
2018-06-22 14:32 ` [Qemu-devel] [RFC PATCH] exec: Move hw_error() to the CPU namespace Peter Maydell
2018-06-22 19:09 ` Thomas Huth
2018-06-23 16:03 ` Peter Maydell
2018-06-22 16:42 ` no-reply
2018-06-22 16:56 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180622134610.23713-1-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).