debuggers.hg

changeset 21088:0d45541c0658

x86: suppress pointless Xen messages from ioapic_guest_write()

Previously, these messages were only issued when old and new RTE
differed. Make it so again (requiring adjustment of the guest provided
RTE as that no longer holds a real vector).

While at it, also make the "allocated vector for irq" message more
useful and occur when what it says really happened.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 17 14:09:55 2010 +0000 (2010-03-17)
parents 066c3eead6ec
children 04cb0829d138
files xen/arch/x86/io_apic.c
line diff
     1.1 --- a/xen/arch/x86/io_apic.c	Wed Mar 17 09:18:34 2010 +0000
     1.2 +++ b/xen/arch/x86/io_apic.c	Wed Mar 17 14:09:55 2010 +0000
     1.3 @@ -2280,18 +2280,24 @@ int ioapic_guest_write(unsigned long phy
     1.4      
     1.5      if ( desc->action )
     1.6      {
     1.7 -        WARN_BOGUS_WRITE("Attempt to modify IO-APIC pin for in-use IRQ!\n");
     1.8 +        spin_lock_irqsave(&ioapic_lock, flags);
     1.9 +        ret = io_apic_read(apic, 0x10 + 2 * pin);
    1.10 +        spin_unlock_irqrestore(&ioapic_lock, flags);
    1.11 +        rte.vector = cfg->vector;
    1.12 +        if ( *(u32*)&rte != ret )
    1.13 +            WARN_BOGUS_WRITE("old_entry=%08x pirq=%d\n%s: "
    1.14 +                             "Attempt to modify IO-APIC pin for in-use IRQ!\n",
    1.15 +                             ret, pirq, __FUNCTION__);
    1.16          return 0;
    1.17      }
    1.18  
    1.19      if ( cfg->vector <= 0 || cfg->vector > LAST_DYNAMIC_VECTOR ) {
    1.20 -
    1.21 -        printk("allocated vector for irq:%d\n", irq);
    1.22 -        
    1.23          vector = assign_irq_vector(irq);
    1.24          if ( vector < 0 )
    1.25              return vector;
    1.26  
    1.27 +        printk(XENLOG_INFO "allocated vector %02x for irq %d\n", vector, irq);
    1.28 +
    1.29          add_pin_to_irq(irq, apic, pin);
    1.30      }
    1.31      spin_lock(&pcidevs_lock);