ia64/xen-unstable

changeset 10705:47fc48740d45

[IA64] Support domU coredump on ia64

This patch supports domU coredump on ia64. xen_panic_event() is
registered to panic_notifier_list, and xen_panic_event() calls
HYPERVISOR_shutdown(SHUTDOWN_crash) at panic time.

If xend is notified of crash status, xend calls dumpCore()
and create domU's core in /var/xen/dump.

For sample crash module and usage, see:

http://lists.xensource.com/archives/html/xen-ia64-devel/2006-07/msg00230.html

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
[minor code re-arrangement]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Mon Jul 24 14:26:03 2006 -0600 (2006-07-24)
parents c8bc76d877e0
children 2db50529223e
files linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Mon Jul 24 13:48:12 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Mon Jul 24 14:26:03 2006 -0600
     1.3 @@ -75,6 +75,20 @@ unsigned long __per_cpu_offset[NR_CPUS];
     1.4  EXPORT_SYMBOL(__per_cpu_offset);
     1.5  #endif
     1.6  
     1.7 +#ifdef CONFIG_XEN
     1.8 +static int
     1.9 +xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
    1.10 +{
    1.11 +	HYPERVISOR_shutdown(SHUTDOWN_crash);
    1.12 +	/* we're never actually going to get here... */
    1.13 +	return NOTIFY_DONE;
    1.14 +}
    1.15 +
    1.16 +static struct notifier_block xen_panic_block = {
    1.17 +	xen_panic_event, NULL, 0 /* try to go last */
    1.18 +};
    1.19 +#endif
    1.20 +
    1.21  extern void ia64_setup_printk_clock(void);
    1.22  
    1.23  DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
    1.24 @@ -418,8 +432,11 @@ setup_arch (char **cmdline_p)
    1.25  	unw_init();
    1.26  
    1.27  #ifdef CONFIG_XEN
    1.28 -	if (is_running_on_xen())
    1.29 +	if (is_running_on_xen()) {
    1.30  		setup_xen_features();
    1.31 +		/* Register a call for panic conditions. */
    1.32 +		notifier_chain_register(&panic_notifier_list, &xen_panic_block);
    1.33 +	}
    1.34  #endif
    1.35  
    1.36  	ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);