WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: early exception enhancement

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: early exception enhancement
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Jun 2007 05:01:17 -0700
Delivery-date: Thu, 21 Jun 2007 04:59:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182355548 -3600
# Node ID f50f0ec7dd2c4cdc6313c357a6fd74eeea60b2a2
# Parent  9c6076750685f9635cb30431c996cffb33dd5535
x86: early exception enhancement

In order to at least have some minimal debuging capabilities when Xen
crashes really early, dump out registers and stack contents in a raw
form.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/boot/x86_32.S |   16 +++++++++++++++-
 xen/arch/x86/boot/x86_64.S |   15 +++++++++++++--
 2 files changed, 28 insertions(+), 3 deletions(-)

diff -r 9c6076750685 -r f50f0ec7dd2c xen/arch/x86/boot/x86_32.S
--- a/xen/arch/x86/boot/x86_32.S        Wed Jun 20 16:58:21 2007 +0100
+++ b/xen/arch/x86/boot/x86_32.S        Wed Jun 20 17:05:48 2007 +0100
@@ -36,15 +36,29 @@ 1:      mov     %eax,(%edi)
 
 /* This is the default interrupt handler. */
 int_msg:
-        .asciz "Unknown interrupt\n"
+        .asciz "Unknown interrupt (cr2=%08x)\n"
+hex_msg:
+        .asciz "  %08x"
         ALIGN
 ignore_int:
+        pusha
         cld
         mov     $(__HYPERVISOR_DS),%eax
         mov     %eax,%ds
         mov     %eax,%es
+        mov     %cr2,%eax
+        push    %eax
         pushl   $int_msg
         call    printk
+        add     $8,%esp
+        mov     %esp,%ebp
+0:      pushl   (%ebp)
+        add     $4,%ebp
+        pushl   $hex_msg
+        call    printk
+        add     $8,%esp
+        test    $0xffc,%ebp
+        jnz     0b
 1:      jmp     1b
 
 ENTRY(stack_start)
diff -r 9c6076750685 -r f50f0ec7dd2c xen/arch/x86/boot/x86_64.S
--- a/xen/arch/x86/boot/x86_64.S        Wed Jun 20 16:58:21 2007 +0100
+++ b/xen/arch/x86/boot/x86_64.S        Wed Jun 20 17:05:48 2007 +0100
@@ -56,12 +56,23 @@ 1:      movq    %rax,(%rdi)
 
 /* This is the default interrupt handler. */
 int_msg:
-        .asciz "Unknown interrupt\n"
+        .asciz "Unknown interrupt (cr2=%016lx)\n"
+hex_msg:
+        .asciz "    %016lx"
 ignore_int:
-        cld
+        SAVE_ALL
+        movq    %cr2,%rsi
         leaq    int_msg(%rip),%rdi
         xorl    %eax,%eax
         call    printk
+        movq    %rsp,%rbp
+0:      movq    (%rbp),%rsi
+        addq    $8,%rbp
+        leaq    hex_msg(%rip),%rdi
+        xorl    %eax,%eax
+        call    printk
+        testq   $0xff8,%rbp
+        jnz     0b
 1:      jmp     1b
 
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: early exception enhancement, Xen patchbot-unstable <=