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-ia64-devel

[Xen-ia64-devel] Re: [Crash-utility] crash version 4.0-3.15 is available

To: "Discussion list for crash utility usage, maintenance and development" <crash-utility@xxxxxxxxxx>
Subject: [Xen-ia64-devel] Re: [Crash-utility] crash version 4.0-3.15 is available
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 25 Dec 2006 10:33:51 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 24 Dec 2006 17:33:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <458BF458.7C9444E8@xxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45895394.8A08CB2A@xxxxxxxxxx> <20061221020431.GB12591%yamahata@xxxxxxxxxxxxx> <458A920F.7DFD28D@xxxxxxxxxx> <20061222031915.GD9022%yamahata@xxxxxxxxxxxxx> <458BF458.7C9444E8@xxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Fri, Dec 22, 2006 at 10:06:01AM -0500, Dave Anderson wrote:

> Not quite -- it leaves out the most important part.  Your
> patch will cause a switch_stack register dump to be laid down,
> but the address of the switch_stack needs to be stored in the
> task_struct->thread.ksp of the panicking task:

Ouch. attached the updated patch.

# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1167010270 -32400
# Node ID 1f2ea340120cfc05caabb4b0c5cb2c24d8c6431b
# Parent  80c5b5914b795b28249c8f7251ecd24b53186339
As Dave requested, call unw_init_running() and save ksp before SHUTDOWN_crash.
This makes crash command happy.
PATCHNAME: unw_init_running_before_shutdown_crash

Signed-off-by: Dave Anderson <anderson@xxxxxxxxxx>
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 80c5b5914b79 -r 1f2ea340120c 
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Wed Dec 20 14:55:02 
2006 -0700
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Mon Dec 25 10:31:10 
2006 +0900
@@ -77,10 +77,18 @@ EXPORT_SYMBOL(__per_cpu_offset);
 #endif
 
 #ifdef CONFIG_XEN
+static void
+xen_panic_hypercall(struct unw_frame_info *info, void *arg)
+{
+       current->thread.ksp = (__u64)info->sw - 16;
+       HYPERVISOR_shutdown(SHUTDOWN_crash);
+       /* we're never actually going to get here... */
+}
+
 static int
 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-       HYPERVISOR_shutdown(SHUTDOWN_crash);
+       unw_init_running(xen_panic_hypercall, NULL);
        /* we're never actually going to get here... */
        return NOTIFY_DONE;
 }

-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>