ia64/xen-unstable
changeset 16000:d7c3b12014b3
[IA64] Kdump: Save dom0_mm_pgd_mfn in vmcore on ia64
On Xen dom0_mm_pgd_mfn needs to be saved in the vmcore in
order to allow the crash utility to navigate the vmcore file.
Cc: Itsuro ODA <oda@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
On Xen dom0_mm_pgd_mfn needs to be saved in the vmcore in
order to allow the crash utility to navigate the vmcore file.
Cc: Itsuro ODA <oda@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Thu Sep 27 15:10:42 2007 -0600 (2007-09-27) |
parents | 4108c2589fd1 |
children | 2b0cbf3ef83f |
files | xen/arch/ia64/xen/crash.c xen/include/xen/elfcore.h |
line diff
1.1 --- a/xen/arch/ia64/xen/crash.c Thu Sep 27 15:08:13 2007 -0600 1.2 +++ b/xen/arch/ia64/xen/crash.c Thu Sep 27 15:10:42 2007 -0600 1.3 @@ -15,16 +15,21 @@ 1.4 #include <linux/hardirq.h> 1.5 #include <linux/smp.h> 1.6 #include <asm/processor.h> 1.7 +#include <xen/sched.h> 1.8 1.9 void machine_crash_shutdown(void) 1.10 { 1.11 - //printk("machine_crash_shutdown: %d\n", smp_processor_id()); 1.12 + crash_xen_info_t *info; 1.13 + unsigned long dom0_mm_pgd_mfn; 1.14 + 1.15 if (in_interrupt()) 1.16 ia64_eoi(); 1.17 kexec_crash_save_info(); 1.18 - printk(__FILE__ ": %s: save the eqivalent of x86's " 1.19 - "dom0->shared_info->arch.pfn_to_mfn_frame_list_list?\n", 1.20 - __FUNCTION__); 1.21 + info = kexec_crash_save_info(); 1.22 + /* Info is not word aligned on ia64 */ 1.23 + dom0_mm_pgd_mfn = __pa(dom0->arch.mm.pgd) >> PAGE_SHIFT; 1.24 + memcpy((char *)info + offsetof(crash_xen_info_t, dom0_mm_pgd_mfn), 1.25 + &dom0_mm_pgd_mfn, sizeof(dom0_mm_pgd_mfn)); 1.26 #ifdef CONFIG_SMP 1.27 smp_send_stop(); 1.28 #endif
2.1 --- a/xen/include/xen/elfcore.h Thu Sep 27 15:08:13 2007 -0600 2.2 +++ b/xen/include/xen/elfcore.h Thu Sep 27 15:10:42 2007 -0600 2.3 @@ -65,9 +65,12 @@ typedef struct { 2.4 unsigned long xen_compile_date; 2.5 unsigned long xen_compile_time; 2.6 unsigned long tainted; 2.7 -#ifdef CONFIG_X86 2.8 +#if defined(__i386__) || defined(__x86_64__) 2.9 unsigned long dom0_pfn_to_mfn_frame_list_list; 2.10 #endif 2.11 +#if defined(__ia64__) 2.12 + unsigned long dom0_mm_pgd_mfn; 2.13 +#endif 2.14 } crash_xen_info_t; 2.15 2.16 #endif /* __ELFCOREC_H__ */