From: Kevin Wolf <kwolf@suse.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH -v2 1/2] Log reset events
Date: Fri, 16 Jan 2009 13:14:13 +0100 [thread overview]
Message-ID: <49707A15.5030803@suse.de> (raw)
In-Reply-To: <49707600.3070509@siemens.com>
Jan Kiszka schrieb:
> [ Updated to use new log API. ]
>
> Original idea&code by Kevin Wolf, now split-up in two patches and added
> more archs.
>
> This patch introduces a flag to log CPU resets. Useful for tracing
> unexpected resets (such as those triggered by x86 triple faults).
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Acked-by: Kevin Wolf <kwolf@suse.de>
> ---
>
> cpu-all.h | 1 +
> exec.c | 2 ++
> target-arm/helper.c | 6 ++++++
> target-cris/translate.c | 5 +++++
> target-i386/helper.c | 5 +++++
> target-m68k/helper.c | 5 +++++
> target-mips/translate.c | 5 +++++
> target-ppc/helper.c | 8 ++++++--
> target-sh4/translate.c | 5 +++++
> target-sparc/helper.c | 5 +++++
> 10 files changed, 45 insertions(+), 2 deletions(-)
>
> diff --git a/cpu-all.h b/cpu-all.h
> index ee0a6e3..59c686a 100644
> --- a/cpu-all.h
> +++ b/cpu-all.h
> @@ -816,6 +816,7 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
> #define CPU_LOG_PCALL (1 << 6)
> #define CPU_LOG_IOPORT (1 << 7)
> #define CPU_LOG_TB_CPU (1 << 8)
> +#define CPU_LOG_RESET (1 << 9)
>
> /* define log items */
> typedef struct CPULogItem {
> diff --git a/exec.c b/exec.c
> index faa6333..fa2ebbd 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1569,6 +1569,8 @@ const CPULogItem cpu_log_items[] = {
> #ifdef TARGET_I386
> { CPU_LOG_PCALL, "pcall",
> "show protected mode far calls/returns/exceptions" },
> + { CPU_LOG_RESET, "cpu_reset",
> + "show CPU state before CPU resets" },
> #endif
> #ifdef DEBUG_IOPORT
> { CPU_LOG_IOPORT, "ioport",
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 81663c8..a243d9b 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -159,6 +159,12 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
> void cpu_reset(CPUARMState *env)
> {
> uint32_t id;
> +
> + if (qemu_loglevel_mask(CPU_LOG_RESET)) {
> + fprintf(logfile, "CPU Reset (CPU %d)\n", env->cpu_index);
> + cpu_dump_state(env, logfile, fprintf, 0);
Shouldn't that be qemu_log() and log_cpu_state() now?
Kevin
next prev parent reply other threads:[~2009-01-16 12:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 10:05 [Qemu-devel] [RESEND][PATCH 1/2] Log reset events Jan Kiszka
2009-01-16 10:20 ` Laurent Desnogues
2009-01-16 11:32 ` [Qemu-devel] " Jan Kiszka
2009-01-16 11:56 ` [Qemu-devel] [PATCH -v2 " Jan Kiszka
2009-01-16 12:14 ` Kevin Wolf [this message]
2009-01-16 12:12 ` Laurent Desnogues
2009-01-16 12:25 ` Kevin Wolf
2009-01-16 12:24 ` Laurent Desnogues
2009-01-16 12:27 ` [Qemu-devel] " Jan Kiszka
2009-01-16 13:35 ` Jan Kiszka
2009-01-16 13:52 ` Kevin Wolf
2009-01-16 14:16 ` [Qemu-devel] [PATCH -v3 " Jan Kiszka
2009-01-16 15:05 ` Kevin Wolf
2009-01-16 15:35 ` [Qemu-devel] " Jan Kiszka
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=49707A15.5030803@suse.de \
--to=kwolf@suse.de \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
/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).