From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Claudio Fontana <cfontana@suse.de>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 1/2] cpus: Do not dump CPU state when calling hw_error()
Date: Wed, 2 Sep 2020 08:33:24 +0200 [thread overview]
Message-ID: <cae3f7a9-eef7-3efa-5968-7bf2de0d2b22@redhat.com> (raw)
In-Reply-To: <20200901112323.94969-2-f4bug@amsat.org>
On 01/09/2020 13.23, Philippe Mathieu-Daudé wrote:
> We already have cpu_abort() to dump CPU states and abort.
>
> Restrict hw_error() to peripheral errors, hoping we can completely
> remove it by proper functions from "error-report.h" in the future.
>
> Suggested-by: Thomas Huth <thuth@redhat.com>
IIRC I rather suggested to rename the function to "cpu_hw_error" and
only use it for real CPU problems...
But I think your approach here is fine as well. Please replace the
"Suggested-by" with "Reviewed-by" now :-)
Thomas
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> softmmu/cpus.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/softmmu/cpus.c b/softmmu/cpus.c
> index a802e899abb..c96a04d7f18 100644
> --- a/softmmu/cpus.c
> +++ b/softmmu/cpus.c
> @@ -913,16 +913,11 @@ static void stop_tcg_kick_timer(void)
> void hw_error(const char *fmt, ...)
> {
> va_list ap;
> - CPUState *cpu;
>
> va_start(ap, fmt);
> fprintf(stderr, "qemu: hardware error: ");
> vfprintf(stderr, fmt, ap);
> fprintf(stderr, "\n");
> - CPU_FOREACH(cpu) {
> - fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
> - cpu_dump_state(cpu, stderr, CPU_DUMP_FPU);
> - }
You could argue that cpu_abort() only prints the state of one CPU and
not of all. But I doubt that dumping the state of *all* CPUs is really
helpful in any of the contexts where hw_error() is used. So I think it's
fine to remove this CPU_FOREACH loop here.
> va_end(ap);
> abort();
> }
>
next prev parent reply other threads:[~2020-09-02 6:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 11:23 [PATCH 0/2] hw/core: Move hw_error() out of cpus.c Philippe Mathieu-Daudé
2020-09-01 11:23 ` [PATCH 1/2] cpus: Do not dump CPU state when calling hw_error() Philippe Mathieu-Daudé
2020-09-02 6:33 ` Thomas Huth [this message]
2020-09-02 16:04 ` Philippe Mathieu-Daudé
2020-09-01 11:23 ` [PATCH 2/2] hw/core: Move hw_error() out of cpus.c Philippe Mathieu-Daudé
2020-09-02 6:37 ` Thomas Huth
2020-09-02 15:38 ` Richard Henderson
2020-09-02 15:59 ` Philippe Mathieu-Daudé
2020-09-02 16:02 ` Thomas Huth
2020-09-02 16:13 ` Philippe Mathieu-Daudé
2020-09-01 16:44 ` [PATCH 0/2] " Richard Henderson
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=cae3f7a9-eef7-3efa-5968-7bf2de0d2b22@redhat.com \
--to=thuth@redhat.com \
--cc=cfontana@suse.de \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).