__serial_rx(c, regs);
}
+static void notify_dom0_con_ring(unsigned long unused)
+{
+ send_guest_global_virq(dom0, VIRQ_CON_RING);
+}
+static DECLARE_TASKLET(notify_dom0_con_ring_tasklet, notify_dom0_con_ring, 0);
+
static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count)
{
char kbuf[128], *kptr;
{
for ( kptr = kbuf; *kptr != '\0'; kptr++ )
putchar_console_ring(*kptr);
- send_guest_global_virq(dom0, VIRQ_CON_RING);
+ tasklet_schedule(¬ify_dom0_con_ring_tasklet);
}
spin_unlock_irq(&console_lock);
* *****************************************************
*/
+static bool_t console_locks_busted;
+
static void __putstr(const char *str)
{
int c;
sercon_puts(str);
vga_puts(str);
- while ( (c = *str++) != '\0' )
- putchar_console_ring(c);
-
- send_guest_global_virq(dom0, VIRQ_CON_RING);
+ if ( !console_locks_busted )
+ {
+ while ( (c = *str++) != '\0' )
+ putchar_console_ring(c);
+ tasklet_schedule(¬ify_dom0_con_ring_tasklet);
+ }
}
static int printk_prefix_check(char *p, char **pp)
{
spin_lock_init(&console_lock);
serial_force_unlock(sercon_handle);
+ console_locks_busted = 1;
console_start_sync();
}