WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Add IO-APIC interrupt debugging to 'i' debug key.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add IO-APIC interrupt debugging to 'i' debug key.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jan 2006 19:20:19 +0000
Delivery-date: Wed, 04 Jan 2006 19:27:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c2e93601eae576e2f3c7e332c41e6f37cb635b78
# Parent  572abc9efcf5dfcebc4ce3333dbe1ea245e1dd34
Add IO-APIC interrupt debugging to 'i' debug key.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 572abc9efcf5 -r c2e93601eae5 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Wed Jan  4 13:45:52 2006
+++ b/xen/arch/x86/io_apic.c    Wed Jan  4 17:37:24 2006
@@ -1807,3 +1807,47 @@
 
     return 0;
 }
+
+void dump_ioapic_irq_info(void)
+{
+    struct irq_pin_list *entry;
+    struct IO_APIC_route_entry rte;
+    unsigned int irq, pin, printed = 0;
+    unsigned long flags;
+
+    for ( irq = 0; irq < NR_IRQS; irq++ )
+    {
+        entry = &irq_2_pin[irq];
+        if ( entry->pin == -1 )
+            continue;
+
+        if ( !printed++ )
+            printk("IO-APIC interrupt information:\n");
+
+        printk("    IRQ%3d Vec%3d:\n", irq, irq_to_vector(irq));
+
+        for ( ; ; )
+        {
+            pin = entry->pin;
+
+            printk("      Apic 0x%02x, Pin %2d: ", entry->apic, pin);
+
+            spin_lock_irqsave(&ioapic_lock, flags);
+            *(((int *)&rte) + 0) = io_apic_read(entry->apic, 0x10 + 2 * pin);
+            *(((int *)&rte) + 1) = io_apic_read(entry->apic, 0x11 + 2 * pin);
+            spin_unlock_irqrestore(&ioapic_lock, flags);
+
+            printk("vector=%u, delivery_mode=%u, dest_mode=%s, "
+                   "delivery_status=%d, polarity=%d, irr=%d, "
+                   "trigger=%s, mask=%d\n",
+                   rte.vector, rte.delivery_mode,
+                   rte.dest_mode ? "logical" : "physical",
+                   rte.delivery_status, rte.polarity, rte.irr,
+                   rte.trigger ? "level" : "edge", rte.mask);
+
+            if ( entry->next == 0 )
+                break;
+            entry = &irq_2_pin[entry->next];
+        }
+    }
+}
diff -r 572abc9efcf5 -r c2e93601eae5 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Wed Jan  4 13:45:52 2006
+++ b/xen/arch/x86/irq.c        Wed Jan  4 17:37:24 2006
@@ -313,6 +313,8 @@
     return 0;
 }
 
+extern void dump_ioapic_irq_info(void);
+
 static void dump_irqs(unsigned char key)
 {
     int i, irq, vector;
@@ -321,6 +323,8 @@
     struct domain *d;
     unsigned long flags;
 
+    printk("Guest interrupt information:\n");
+
     for ( irq = 0; irq < NR_IRQS; irq++ )
     {
         vector = irq_to_vector(irq);
@@ -335,7 +339,7 @@
         {
             action = (irq_guest_action_t *)desc->action;
 
-            printk("IRQ%3d Vec%3d: type=%-15s status=%08x "
+            printk("    IRQ%3d Vec%3d: type=%-15s status=%08x "
                    "in-flight=%d domain-list=",
                    irq, vector, desc->handler->typename,
                    desc->status, action->in_flight);
@@ -366,6 +370,8 @@
 
         spin_unlock_irqrestore(&desc->lock, flags);
     }
+
+    dump_ioapic_irq_info();
 }
 
 static int __init setup_dump_irqs(void)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add IO-APIC interrupt debugging to 'i' debug key., Xen patchbot -unstable <=