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-devel

Re: [Xen-devel] Fwd: Xen4.0/FC8/Linux-2.6.31.13 hang on boot - global_ir

To: ktckd <ktckd9@xxxxxxxxx>
Subject: Re: [Xen-devel] Fwd: Xen4.0/FC8/Linux-2.6.31.13 hang on boot - global_irq != irq for INT_SRC_OVR
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 13 Jul 2010 11:06:24 -0400
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 13 Jul 2010 08:07:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimrkcGIpe1Hzy0BkbBFAoENgLkFwAcTsUkE4m5q@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTim33Hbar2x0ey8R3hyQ97esu_C6ll7GuYQIb8i_@xxxxxxxxxxxxxx> <AANLkTikfK9uhMyDLlix3E9HknQBALWsdt9LcCjsUYUy_@xxxxxxxxxxxxxx> <20100706141542.GA5408@xxxxxxxxxxxxxxxxxxx> <AANLkTimrkcGIpe1Hzy0BkbBFAoENgLkFwAcTsUkE4m5q@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-12-10)
On Wed, Jul 07, 2010 at 11:59:58AM -0500, ktckd wrote:
> Attaching the serial with the grub options mentioned below. Do let me know
> if you need any other information.
> 
> I was using 2.6.18.8 when I tried xen 3.4.0

OK, that is an ancient Dom0. You can try to re-use this Dom0 (2.6.31.x) with 
that
Xen 3.4.0 and see if it works.. but

> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<ffffffff8102f6cf>] add_pin_to_irq_node+0x24/0xaf
> PGD 0 
> Oops: 0000 [#1] SMP 
> last sysfs file: 
> CPU 0 
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.31.13-xen #1 HP EliteBook 8740w
> RIP: e030:[<ffffffff8102f6cf>]  [<ffffffff8102f6cf>] 
> add_pin_to_irq_node+0x24/0xaf
> RSP: e02b:ffff88016d4b1d90  EFLAGS: 00010246
> RAX: 0000000000000000 RBX: 0000000000000009 RCX: 0000000000000009
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
> RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
> R10: 000000000000000f R11: 0000000000000002 R12: 0000000000000009
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000009
> FS:  0000000000000000(0000) GS:ffffc90000000000(0000) knlGS:0000000000000000
> CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
> CR2: 0000000000000000 CR3: 0000000001001000 CR4: 0000000000002660
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process swapper (pid: 1, threadinfo ffff88016d4b0000, task ffff88016d4a8000)
> Stack:
>  ffff88016d688f50 ffffffff811699c1 0000000060629933 0000000000000009
> <0> 0000000000000000 0000000000000001 ffffffff8156b900 ffffffff81030e36
> <0> ffffffffffffffff 0000000000000049 0000000060629933 0000000000000009
> Call Trace:
>  [<ffffffff811699c1>] ? internal_create_group+0xf4/0x174
>  [<ffffffff81030e36>] ? setup_IO_APIC_irq_extra+0xcd/0x153
>  [<ffffffff8121c4ba>] ? acpi_ev_sci_xrupt_handler+0x0/0x4a
>  [<ffffffff8102a863>] ? acpi_gsi_to_irq+0x24/0x40
>  [<ffffffff8120aa37>] ? acpi_os_install_interrupt_handler+0x36/0xbd
>  [<ffffffff81694658>] ? acpi_init+0x0/0x27f
>  [<ffffffff8121b89e>] ? acpi_ev_install_xrupt_handlers+0x1a/0x79
>  [<ffffffff81694658>] ? acpi_init+0x0/0x27f
>  [<ffffffff816946d8>] ? acpi_init+0x80/0x27f
>  [<ffffffff81694658>] ? acpi_init+0x0/0x27f

.. looking at this stack trace and the source code and the serial output
(thank you very much), this caught my eye:

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.

[ which looks to me that pin 0 and pin 2 of the IOAPIC are routed to the
same spot ]

and:

xen: registering gsi 0 triggering 1 polarity 0
xen: --> irq=0
xen_set_ioapic_routing: irq 0 gsi 0 vector 0 ioapic 0 pin 0 triggering 0
polarity 0
xen: registering gsi 1 triggering 1 polarity 0
xen: --> irq=1
xen_set_ioapic_routing: irq 1 gsi 1 vector 1 ioapic 0 pin 1 triggering 0
polarity 0
xen: registering gsi 3 triggering 1 polarity 0
xen: --> irq=3

The lack of IRQ 2 is the worrying part. The reason for that is b/c the
bus_irq (0) != for GSI IRQ 2 (2) so we end up in acpi_get_override_irq
going over the 16 IRQs and return -1. Hence xen_setup_pirqs fails to setup
an IRQ handler for IRQ 2.

Which would explain why the  'add_pin_to_irq_node' would fail. In one part
it tries to do "entry = cfg->irq_2_pin;" which would throw a NULL
pointer exception as 'cfg' for IRQ 2 has not been defined.

This is all just a speculation. But we can try testing this out with
this hack patch:

NOTE: You might need to change the polarity to zero instead of 1.

diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index 1af81dd..1d3cc7f 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -77,6 +77,7 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
 void __init xen_setup_pirqs(void)
 {
        int irq;
+       int rc;
 
        if (0 == nr_ioapics) {
                for (irq = 0; irq < NR_IRQS_LEGACY; irq++)
@@ -88,9 +89,15 @@ void __init xen_setup_pirqs(void)
        for (irq = 0; irq < NR_IRQS_LEGACY; irq++) {
                int trigger, polarity;
 
-               if (acpi_get_override_irq(irq, &trigger, &polarity) == -1)
-                       continue;
+               rc = acpi_get_override_irq(irq, &trigger, &polarity);
+               if (rc == -1) {
+                       printk(KERN_INFO "%s: IRQ: %d bus_irq != 
global_irq!\n", __FUNCTION__, irq);
+                       if (irq != 2)
+                               continue;
 
+                       trigger = 1; /* level */
+                       polarity = 1; /* low, not sure if should be high? */
+               }
                xen_register_gsi(irq,
                        trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE,
                        polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH);

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