aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-17 14:09:55 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-17 14:09:55 +0000
commit5e827c9822dafd58156437977a12bd3d82f1f490 (patch)
tree631df33b502d2e2f6e17e7734e2f55b12dd31baf
parentcdffe59f087dafab9ff12f6c8c2be4e67e848342 (diff)
downloadxen-5e827c9822dafd58156437977a12bd3d82f1f490.tar.gz
xen-5e827c9822dafd58156437977a12bd3d82f1f490.tar.bz2
xen-5e827c9822dafd58156437977a12bd3d82f1f490.zip
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>
-rw-r--r--xen/arch/x86/io_apic.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 977d939ca0..f081cf8754 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2280,18 +2280,24 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
if ( desc->action )
{
- WARN_BOGUS_WRITE("Attempt to modify IO-APIC pin for in-use IRQ!\n");
+ spin_lock_irqsave(&ioapic_lock, flags);
+ ret = io_apic_read(apic, 0x10 + 2 * pin);
+ spin_unlock_irqrestore(&ioapic_lock, flags);
+ rte.vector = cfg->vector;
+ if ( *(u32*)&rte != ret )
+ WARN_BOGUS_WRITE("old_entry=%08x pirq=%d\n%s: "
+ "Attempt to modify IO-APIC pin for in-use IRQ!\n",
+ ret, pirq, __FUNCTION__);
return 0;
}
if ( cfg->vector <= 0 || cfg->vector > LAST_DYNAMIC_VECTOR ) {
-
- printk("allocated vector for irq:%d\n", irq);
-
vector = assign_irq_vector(irq);
if ( vector < 0 )
return vector;
+ printk(XENLOG_INFO "allocated vector %02x for irq %d\n", vector, irq);
+
add_pin_to_irq(irq, apic, pin);
}
spin_lock(&pcidevs_lock);