void show_execution_state(const struct cpu_user_regs *regs)
{
+ /* Prevent interleaving of output. */
+ unsigned long flags = console_lock_recursive_irqsave();
+
show_registers(regs);
show_stack(regs);
+
+ console_unlock_recursive_irqrestore(flags);
}
void vcpu_show_execution_state(struct vcpu *v)
{
+ unsigned long flags;
+
printk("*** Dumping Dom%d vcpu#%d state: ***\n",
v->domain->domain_id, v->vcpu_id);
vcpu_pause(v); /* acceptably dangerous */
+ /* Prevent interleaving of output. */
+ flags = console_lock_recursive_irqsave();
+
vcpu_show_registers(v);
if ( guest_kernel_mode(v, &v->arch.user_regs) )
show_guest_stack(v, &v->arch.user_regs);
+ console_unlock_recursive_irqrestore(flags);
+
vcpu_unpause(v);
}
atomic_dec(&print_everything);
}
+unsigned long console_lock_recursive_irqsave(void)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ spin_lock_recursive(&console_lock);
+
+ return flags;
+}
+
+void console_unlock_recursive_irqrestore(unsigned long flags)
+{
+ spin_unlock_recursive(&console_lock);
+ local_irq_restore(flags);
+}
+
void console_force_unlock(void)
{
watchdog_disable();
int fill_console_start_info(struct dom0_vga_console_info *);
+unsigned long console_lock_recursive_irqsave(void);
+void console_unlock_recursive_irqrestore(unsigned long flags);
void console_force_unlock(void);
void console_start_sync(void);