2009-08-01 11:53:46 +02:00
|
|
|
Index: xen-3.4.1-testing/xen/arch/ia64/linux-xen/smp.c
|
2008-09-12 17:57:53 +02:00
|
|
|
===================================================================
|
2009-08-01 11:53:46 +02:00
|
|
|
--- xen-3.4.1-testing.orig/xen/arch/ia64/linux-xen/smp.c
|
|
|
|
+++ xen-3.4.1-testing/xen/arch/ia64/linux-xen/smp.c
|
2009-05-04 18:38:09 +02:00
|
|
|
@@ -190,7 +190,7 @@ handle_IPI (int irq, void *dev_id, struc
|
2008-09-12 17:57:53 +02:00
|
|
|
* At this point the structure may be gone unless
|
|
|
|
* wait is true.
|
|
|
|
*/
|
|
|
|
- (*func)(info);
|
|
|
|
+ (*func)(info ?: regs);
|
|
|
|
|
|
|
|
/* Notify the sending CPU that the task is done. */
|
|
|
|
mb();
|
2009-08-01 11:53:46 +02:00
|
|
|
Index: xen-3.4.1-testing/xen/arch/x86/smp.c
|
2008-09-12 17:57:53 +02:00
|
|
|
===================================================================
|
2009-08-01 11:53:46 +02:00
|
|
|
--- xen-3.4.1-testing.orig/xen/arch/x86/smp.c
|
|
|
|
+++ xen-3.4.1-testing/xen/arch/x86/smp.c
|
2008-10-11 16:22:01 +02:00
|
|
|
@@ -356,7 +356,7 @@ fastcall void smp_call_function_interrup
|
2008-09-12 17:57:53 +02:00
|
|
|
|
|
|
|
if ( call_data->wait )
|
|
|
|
{
|
|
|
|
- (*func)(info);
|
|
|
|
+ (*func)(info ?: regs);
|
|
|
|
mb();
|
|
|
|
atomic_inc(&call_data->finished);
|
|
|
|
}
|
2008-10-11 16:22:01 +02:00
|
|
|
@@ -364,7 +364,7 @@ fastcall void smp_call_function_interrup
|
2008-09-12 17:57:53 +02:00
|
|
|
{
|
|
|
|
mb();
|
|
|
|
atomic_inc(&call_data->started);
|
|
|
|
- (*func)(info);
|
|
|
|
+ (*func)(info ?: regs);
|
|
|
|
}
|
|
|
|
|
|
|
|
irq_exit();
|
2009-08-01 11:53:46 +02:00
|
|
|
Index: xen-3.4.1-testing/xen/common/keyhandler.c
|
2008-09-12 17:57:53 +02:00
|
|
|
===================================================================
|
2009-08-01 11:53:46 +02:00
|
|
|
--- xen-3.4.1-testing.orig/xen/common/keyhandler.c
|
|
|
|
+++ xen-3.4.1-testing/xen/common/keyhandler.c
|
2008-09-12 17:57:53 +02:00
|
|
|
@@ -91,14 +91,25 @@ static void show_handlers(unsigned char
|
|
|
|
key_table[i].desc);
|
|
|
|
}
|
|
|
|
|
|
|
|
-static void __dump_execstate(void *unused)
|
|
|
|
+static void __dump_execstate(void *_regs)
|
|
|
|
{
|
|
|
|
- dump_execution_state();
|
|
|
|
- printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id());
|
|
|
|
+ struct cpu_user_regs *regs = _regs;
|
|
|
|
+ unsigned int cpu = smp_processor_id();
|
|
|
|
+
|
|
|
|
+ if ( !guest_mode(regs) )
|
|
|
|
+ {
|
|
|
|
+ printk("\n*** Dumping CPU%u host state: ***\n", cpu);
|
|
|
|
+ show_execution_state(regs);
|
|
|
|
+ }
|
|
|
|
if ( is_idle_vcpu(current) )
|
|
|
|
- printk("No guest context (CPU is idle).\n");
|
|
|
|
+ printk("No guest context (CPU%u is idle).\n", cpu);
|
|
|
|
else
|
|
|
|
+ {
|
|
|
|
+ printk("*** Dumping CPU%u guest state (d%d:v%d): ***\n",
|
|
|
|
+ smp_processor_id(), current->domain->domain_id,
|
|
|
|
+ current->vcpu_id);
|
|
|
|
show_execution_state(guest_cpu_user_regs());
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
|
|
|
|
@@ -111,14 +122,12 @@ static void dump_registers(unsigned char
|
|
|
|
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);
|
|
|
|
+ __dump_execstate(regs);
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2009-08-01 11:53:46 +02:00
|
|
|
Index: xen-3.4.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
|
2008-09-12 17:57:53 +02:00
|
|
|
===================================================================
|
2009-08-01 11:53:46 +02:00
|
|
|
--- xen-3.4.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
|
|
|
|
+++ xen-3.4.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
|
2008-09-12 17:57:53 +02:00
|
|
|
@@ -278,7 +278,7 @@ struct switch_stack {
|
|
|
|
# define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
|
|
|
|
# define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr)
|
|
|
|
#ifdef XEN
|
|
|
|
-# define guest_mode(regs) (ia64_psr(regs)->cpl != 0)
|
|
|
|
+# define guest_mode(regs) (ia64_psr(regs)->cpl && !ia64_psr(regs)->vm)
|
|
|
|
# define guest_kernel_mode(regs) (ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL)
|
|
|
|
# define vmx_guest_kernel_mode(regs) (ia64_psr(regs)->cpl == 0)
|
|
|
|
# define regs_increment_iip(regs) \
|