From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86: also print CRn register values upon double fault
Date: Wed, 19 Dec 2012 13:22:23 +0000 [thread overview]
Message-ID: <CCF7700F.55FDC%keir@xen.org> (raw)
In-Reply-To: <50D1C91D02000078000B1690@nat28.tlf.novell.com>
On 19/12/2012 13:03, "Jan Beulich" <JBeulich@suse.com> wrote:
> Do so by simply re-using _show_registers().
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- a/xen/arch/x86/x86_64/traps.c
> +++ b/xen/arch/x86/x86_64/traps.c
> @@ -225,6 +225,7 @@ void double_fault(void);
> void do_double_fault(struct cpu_user_regs *regs)
> {
> unsigned int cpu;
> + unsigned long crs[8];
>
> watchdog_disable();
>
> @@ -235,22 +236,18 @@ void do_double_fault(struct cpu_user_reg
> /* Find information saved during fault and dump it to the console. */
> printk("*** DOUBLE FAULT ***\n");
> print_xen_info();
> - printk("CPU: %d\nRIP: %04x:[<%016lx>]",
> - cpu, regs->cs, regs->rip);
> - print_symbol(" %s", regs->rip);
> - printk("\nRFLAGS: %016lx\n", regs->rflags);
> - printk("rax: %016lx rbx: %016lx rcx: %016lx\n",
> - regs->rax, regs->rbx, regs->rcx);
> - printk("rdx: %016lx rsi: %016lx rdi: %016lx\n",
> - regs->rdx, regs->rsi, regs->rdi);
> - printk("rbp: %016lx rsp: %016lx r8: %016lx\n",
> - regs->rbp, regs->rsp, regs->r8);
> - printk("r9: %016lx r10: %016lx r11: %016lx\n",
> - regs->r9, regs->r10, regs->r11);
> - printk("r12: %016lx r13: %016lx r14: %016lx\n",
> - regs->r12, regs->r13, regs->r14);
> - printk("r15: %016lx cs: %016lx ss: %016lx\n",
> - regs->r15, (long)regs->cs, (long)regs->ss);
> +
> + crs[0] = read_cr0();
> + crs[2] = read_cr2();
> + crs[3] = read_cr3();
> + crs[4] = read_cr4();
> + regs->ds = read_segment_register(ds);
> + regs->es = read_segment_register(es);
> + regs->fs = read_segment_register(fs);
> + regs->gs = read_segment_register(gs);
> +
> + printk("CPU: %d\n", cpu);
> + _show_registers(regs, crs, CTXT_hypervisor, NULL);
> show_stack_overflow(cpu, regs->rsp);
>
> panic("DOUBLE FAULT -- system shutdown\n");
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2012-12-19 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 13:03 [PATCH] x86: also print CRn register values upon double fault Jan Beulich
2012-12-19 13:22 ` Keir Fraser [this message]
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=CCF7700F.55FDC%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.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).