diff -r edfb58ca4d96 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/arch/x86/traps.c	Fri Mar 28 06:56:55 2008 +0900
@@ -329,6 +329,33 @@ void show_execution_state(struct cpu_use
 {
     show_registers(regs);
     show_stack(regs);
+}
+
+void __dump_execstate(void *unused)
+{
+    dump_execution_state();
+    printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id());
+    if ( is_idle_vcpu(current) )
+        printk("No guest context (CPU is idle).\n");
+    else
+        show_execution_state(guest_cpu_user_regs());
+}
+
+void _dump_registers(struct cpu_user_regs *regs)
+{
+    unsigned int cpu;
+
+    /* Get local execution state out immediately, in case we get stuck. */
+    printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id());
+    __dump_execstate(NULL);
+
+    for_each_online_cpu ( cpu )
+    {
+        if ( cpu == smp_processor_id() )
+            continue;
+        printk("\n*** Dumping CPU%d host state: ***\n", cpu);
+        on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
+    }
 }
 
 char *trapstr(int trapnr)
diff -r edfb58ca4d96 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/common/keyhandler.c	Fri Mar 28 06:56:55 2008 +0900
@@ -89,34 +89,10 @@ static void show_handlers(unsigned char 
                    key_table[i].desc);
 }
 
-static void __dump_execstate(void *unused)
-{
-    dump_execution_state();
-    printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id());
-    if ( is_idle_vcpu(current) )
-        printk("No guest context (CPU is idle).\n");
-    else
-        show_execution_state(guest_cpu_user_regs());
-}
-
 static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
 {
-    unsigned int cpu;
-
     printk("'%c' pressed -> dumping registers\n", key);
-
-    /* Get local execution state out immediately, in case we get stuck. */
-    printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id());
-    __dump_execstate(NULL);
-
-    for_each_online_cpu ( cpu )
-    {
-        if ( cpu == smp_processor_id() )
-            continue;
-        printk("\n*** Dumping CPU%d host state: ***\n", cpu);
-        on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
-    }
-
+    _dump_registers(regs);
     printk("\n");
 }
 
diff -r edfb58ca4d96 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/drivers/char/console.c	Fri Mar 28 06:56:55 2008 +0900
@@ -946,7 +946,7 @@ void __bug(char *file, int line)
 {
     console_start_sync();
     printk("Xen BUG at %s:%d\n", file, line);
-    dump_execution_state();
+    dump_execution_state(NULL);
     panic("Xen BUG at %s:%d\n", file, line);
     for ( ; ; ) ;
 }
@@ -954,7 +954,7 @@ void __warn(char *file, int line)
 void __warn(char *file, int line)
 {
     printk("Xen WARN at %s:%d\n", file, line);
-    dump_execution_state();
+    dump_execution_state(NULL);
 }
 
 
diff -r edfb58ca4d96 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/include/asm-x86/processor.h	Fri Mar 28 06:56:55 2008 +0900
@@ -561,6 +561,8 @@ void show_stack_overflow(unsigned int cp
 void show_stack_overflow(unsigned int cpu, unsigned long esp);
 void show_registers(struct cpu_user_regs *regs);
 void show_execution_state(struct cpu_user_regs *regs);
+void __dump_execstate(void *unused);
+void _dump_registers(struct cpu_user_regs *regs);
 void show_page_walk(unsigned long addr);
 asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
diff -r edfb58ca4d96 xen/include/asm-x86/x86_32/bug.h
--- a/xen/include/asm-x86/x86_32/bug.h	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/include/asm-x86/x86_32/bug.h	Fri Mar 28 06:56:55 2008 +0900
@@ -7,7 +7,9 @@ struct bug_frame_str {
 } __attribute__((packed));
 #define BUG_MOV_STR "\xbc"
 
-#define dump_execution_state()                          \
+#define dump_execution_state(i) _dump_execution_state()
+
+#define _dump_execution_state()                         \
     asm volatile (                                      \
         "ud2 ; ret $%c0"                                \
         : : "i" (BUGFRAME_dump) )
diff -r edfb58ca4d96 xen/include/asm-x86/x86_64/bug.h
--- a/xen/include/asm-x86/x86_64/bug.h	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/include/asm-x86/x86_64/bug.h	Fri Mar 28 06:56:55 2008 +0900
@@ -7,7 +7,8 @@ struct bug_frame_str {
 } __attribute__((packed));
 #define BUG_MOV_STR "\x48\xbc"
 
-#define dump_execution_state()                          \
+#define dump_execution_state(i) _dump_execution_state()
+#define _dump_execution_state()                         \
     asm volatile (                                      \
         "ud2 ; ret $%c0"                                \
         : : "i" (BUGFRAME_dump) )
diff -r edfb58ca4d96 xen/include/xen/smp.h
--- a/xen/include/xen/smp.h	Tue Mar 25 12:37:17 2008 -0600
+++ b/xen/include/xen/smp.h	Fri Mar 28 06:56:55 2008 +0900
@@ -47,6 +47,13 @@ extern int on_selected_cpus(
     int retry,
     int wait);
 
+/* this is only for ia64. */
+extern int on_selected_cpus_regs(
+    cpumask_t selected,
+    void (*func) (void *info, struct cpu_user_regs *),
+    void *info,
+    int retry,
+    int wait);
 /*
  * Mark the boot cpu "online" so that it can call console drivers in
  * printk() and can access its per-cpu storage.
