# HG changeset patch # User Keir Fraser # Date 1292414674 0 # Node ID a3a29e67aa7e75a094e1b4237b10a68cf829b542 # Parent 16673224c1cc2ca3bb9730f1d7c84fe4d96e5323 Reduce side effects of handling '*' debug key References: bnc#659284 NMI watchdog should be suppressed when dumping IRQ handlers. Softirqs should be handled periodically while processing non-IRQ handlers. Signed-off-by: Jan Beulich # HG changeset patch # User Keir Fraser # Date 1293185578 0 # Node ID dca1b7cf2e2c27cd160bd1d1d284e3f810d4936c # Parent e8acb9753ff1a5cd3d6a45eda5f4c6f0059c281a re-add calls accidentally deleted from run_all_nonirq_keyhandlers() c/s 22538:a3a29e67aa7e, having got applied in a form different from the one submitted, resulted in the calls to console_{start,end}_log_everything() getting removed without replacement. Add them back since, other than run_all_keyhandlers(), this doesn't run with log-everything already in effect. Signed-off-by: Jan Beulich --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -407,14 +407,17 @@ static void run_all_nonirq_keyhandlers(u int k; console_start_log_everything(); + for ( k = 0; k < ARRAY_SIZE(key_table); k++ ) { + process_pending_softirqs_nested(); h = key_table[k]; if ( (h == NULL) || !h->diagnostic || h->irq_callback ) continue; printk("[%c: %s]\n", k, h->desc); (*h->u.fn)(k); } + console_end_log_everything(); } @@ -426,10 +429,11 @@ static void run_all_keyhandlers(unsigned struct keyhandler *h; int k; + watchdog_disable(); + printk("'%c' pressed -> firing all diagnostic keyhandlers\n", key); /* Fire all the IRQ-context diangostic keyhandlers now */ - console_start_log_everything(); for ( k = 0; k < ARRAY_SIZE(key_table); k++ ) { h = key_table[k]; @@ -438,7 +442,8 @@ static void run_all_keyhandlers(unsigned printk("[%c: %s]\n", k, h->desc); (*h->u.irq_fn)(k, regs); } - console_end_log_everything(); + + watchdog_enable(); /* Trigger the others from a tasklet in non-IRQ context */ tasklet_schedule(&run_all_keyhandlers_tasklet); --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -54,6 +54,16 @@ void process_pending_softirqs(void) __do_softirq(1ul<