]> xenbits.xensource.com Git - xen.git/commitdiff
[IA64] Kdump: Save dom0_mm_pgd_mfn in vmcore on ia64
authorAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 21:10:42 +0000 (15:10 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 21:10:42 +0000 (15:10 -0600)
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>
xen/arch/ia64/xen/crash.c
xen/include/xen/elfcore.h

index 1cc78fb15f9db4f24578be8310f585546a08e6ba..df340b1c5789cd34dc6df25d10328374e54ad10a 100644 (file)
 #include <linux/hardirq.h>
 #include <linux/smp.h>
 #include <asm/processor.h>
+#include <xen/sched.h>
 
 void machine_crash_shutdown(void)
 {
-    //printk("machine_crash_shutdown: %d\n", smp_processor_id());
+    crash_xen_info_t *info;
+    unsigned long dom0_mm_pgd_mfn;
+
     if (in_interrupt())
         ia64_eoi();
     kexec_crash_save_info();
-    printk(__FILE__ ": %s: save the eqivalent of x86's "
-           "dom0->shared_info->arch.pfn_to_mfn_frame_list_list?\n",
-           __FUNCTION__);
+    info = kexec_crash_save_info();
+    /* Info is not word aligned on ia64 */
+    dom0_mm_pgd_mfn = __pa(dom0->arch.mm.pgd) >> PAGE_SHIFT;
+    memcpy((char *)info + offsetof(crash_xen_info_t, dom0_mm_pgd_mfn),
+          &dom0_mm_pgd_mfn, sizeof(dom0_mm_pgd_mfn));
 #ifdef CONFIG_SMP
     smp_send_stop();
 #endif
index fbe8ed1a6a6dfcea58b31619db3d4144a7c807d5..175ee628fea4ce790d754c7aaa51f8ea9fbf5b16 100644 (file)
@@ -65,9 +65,12 @@ typedef struct {
     unsigned long xen_compile_date;
     unsigned long xen_compile_time;
     unsigned long tainted;
-#ifdef CONFIG_X86
+#if defined(__i386__) || defined(__x86_64__)
     unsigned long dom0_pfn_to_mfn_frame_list_list;
 #endif
+#if defined(__ia64__)
+    unsigned long dom0_mm_pgd_mfn;
+#endif
 } crash_xen_info_t;
 
 #endif /* __ELFCOREC_H__ */