ia64/xen-unstable

changeset 19456:1f893d68a6ad

xen: include MSI/MSI-X information in interrupt debug output

With per-domain irq-to-vector mappings, dump_irqs() omitted some
vectors. This patch cycles through the vectors rather than
interrupts and prints the same debug information. The patch also
prints out information about mapped but unbound interrupts.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 11:39:32 2009 +0100 (2009-03-31)
parents d64a487d6c32
children 9202d800b06f
files xen/arch/x86/irq.c
line diff
     1.1 --- a/xen/arch/x86/irq.c	Tue Mar 31 11:38:05 2009 +0100
     1.2 +++ b/xen/arch/x86/irq.c	Tue Mar 31 11:39:32 2009 +0100
     1.3 @@ -1069,7 +1069,7 @@ extern void dump_ioapic_irq_info(void);
     1.4  
     1.5  static void dump_irqs(unsigned char key)
     1.6  {
     1.7 -    int i, irq, vector;
     1.8 +    int i, glob_irq, irq, vector;
     1.9      irq_desc_t *desc;
    1.10      irq_guest_action_t *action;
    1.11      struct domain *d;
    1.12 @@ -1077,41 +1077,47 @@ static void dump_irqs(unsigned char key)
    1.13  
    1.14      printk("Guest interrupt information:\n");
    1.15  
    1.16 -    for ( irq = 0; irq < NR_IRQS; irq++ )
    1.17 +    for ( vector = 0; vector < NR_VECTORS; vector++ )
    1.18      {
    1.19 -        vector = irq_to_vector(irq);
    1.20 -        if ( vector == 0 )
    1.21 -            continue;
    1.22 +
    1.23 +        glob_irq = vector_to_irq(vector);
    1.24  
    1.25          desc = &irq_desc[vector];
    1.26 +        if ( desc == NULL || desc->handler == &no_irq_type )
    1.27 +            continue;
    1.28  
    1.29          spin_lock_irqsave(&desc->lock, flags);
    1.30  
    1.31 -        if ( desc->status & IRQ_GUEST )
    1.32 +        if ( !(desc->status & IRQ_GUEST) )
    1.33 +            printk("   Vec%3d IRQ%3d: type=%-15s status=%08x "
    1.34 +                   "mapped, unbound\n",
    1.35 +                   vector, glob_irq, desc->handler->typename, desc->status);
    1.36 +        else
    1.37          {
    1.38              action = (irq_guest_action_t *)desc->action;
    1.39  
    1.40 -            printk("    IRQ%3d Vec%3d: type=%-15s status=%08x "
    1.41 +            printk("   Vec%3d IRQ%3d: type=%-15s status=%08x "
    1.42                     "in-flight=%d domain-list=",
    1.43 -                   irq, vector, desc->handler->typename,
    1.44 +                   vector, glob_irq, desc->handler->typename,
    1.45                     desc->status, action->in_flight);
    1.46  
    1.47              for ( i = 0; i < action->nr_guests; i++ )
    1.48              {
    1.49                  d = action->guest[i];
    1.50 -                printk("%u(%c%c%c%c)",
    1.51 -                       d->domain_id,
    1.52 -                       (test_bit(d->pirq_to_evtchn[irq],
    1.53 +                irq = domain_vector_to_irq(d, vector);
    1.54 +                printk("%u:%3d(%c%c%c%c)",
    1.55 +                       d->domain_id, irq,
    1.56 +                       (test_bit(d->pirq_to_evtchn[glob_irq],
    1.57                                   &shared_info(d, evtchn_pending)) ?
    1.58                          'P' : '-'),
    1.59 -                       (test_bit(d->pirq_to_evtchn[irq] /
    1.60 +                       (test_bit(d->pirq_to_evtchn[glob_irq] /
    1.61                                   BITS_PER_EVTCHN_WORD(d),
    1.62                                   &vcpu_info(d->vcpu[0], evtchn_pending_sel)) ?
    1.63                          'S' : '-'),
    1.64 -                       (test_bit(d->pirq_to_evtchn[irq],
    1.65 +                       (test_bit(d->pirq_to_evtchn[glob_irq],
    1.66                                   &shared_info(d, evtchn_mask)) ?
    1.67                          'M' : '-'),
    1.68 -                       (test_bit(irq, d->pirq_mask) ?
    1.69 +                       (test_bit(glob_irq, d->pirq_mask) ?
    1.70                          'M' : '-'));
    1.71                  if ( i != action->nr_guests )
    1.72                      printk(",");