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] pvops-2.6.32 - Interrupt routing problem

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] pvops-2.6.32 - Interrupt routing problem
From: Bastian Blank <waldi@xxxxxxxxxx>
Date: Fri, 19 Mar 2010 12:39:04 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Delivery-date: Fri, 19 Mar 2010 04:40:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100316182053.GA2258@xxxxxxxxxxxxxxxxxxxxxxx>
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: <4B9D0726.3060304@xxxxxxxx> <20100314161750.GA7790@xxxxxxxxxxxxxxxxxxxxxxx> <EB8593BCECAB3D40A8248BE0B6400A38464169F7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20100315101126.GA24650@xxxxxxxxxxxxxxxxxxxxxxx> <EB8593BCECAB3D40A8248BE0B6400A38464AE52E@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20100315211459.GA9314@xxxxxxxxxxxxxxxxxxxxxxx> <20100316013114.GD7622@xxxxxxxxxxxxxxxxxxx> <20100316081832.GA20502@xxxxxxxxxxxxxxxxxxxxxxx> <20100316153216.GB28821@xxxxxxxxxxxxxxxxxxx> <20100316182053.GA2258@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Mar 16, 2010 at 07:20:53PM +0100, Bastian Blank wrote:

Okay, lets go through the log again.

Initial readout before dom0 starts. Only 0 and 9 masked.

> (XEN)  NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   
> (XEN)  00 000 00  1    0    0   0   0    0    0    00
> (XEN)  01 000 00  0    0    0   0   0    0    0    28
> (XEN)  02 000 00  0    0    0   0   0    0    0    F0
> (XEN)  03 000 00  0    0    0   0   0    0    0    30
> (XEN)  04 000 00  0    0    0   0   0    0    0    F1
> (XEN)  05 000 00  0    0    0   0   0    0    0    38
> (XEN)  06 000 00  0    0    0   0   0    0    0    40
> (XEN)  07 000 00  0    0    0   0   0    0    0    48
> (XEN)  08 000 00  0    0    0   0   0    0    0    50
> (XEN)  09 000 00  1    1    0   1   0    0    0    58
> (XEN)  0a 000 00  0    0    0   0   0    0    0    60
> (XEN)  0b 000 00  0    0    0   0   0    0    0    68
> (XEN)  0c 000 00  0    0    0   0   0    0    0    70
> (XEN)  0d 000 00  0    0    0   0   0    0    0    78
> (XEN)  0e 000 00  0    0    0   0   0    0    0    88
> (XEN)  0f 000 00  0    0    0   0   0    0    0    90

Dom0 tries to set the first 16 IO-APIC pins to edge.

> (XEN) IOAPIC[0]: Set PCI routing entry (8-5 -> 0x38 -> IRQ 5 Mode:0 Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-6 -> 0x40 -> IRQ 6 Mode:0 Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-7 -> 0x48 -> IRQ 7 Mode:0 Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-8 -> 0x50 -> IRQ 8 Mode:0 Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-9 -> 0x58 -> IRQ 9 Mode:0 Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-10 -> 0x60 -> IRQ 10 Mode:0 
> Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-11 -> 0x68 -> IRQ 11 Mode:0 
> Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-12 -> 0x70 -> IRQ 12 Mode:0 
> Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-13 -> 0x78 -> IRQ 13 Mode:0 
> Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-14 -> 0x88 -> IRQ 14 Mode:0 
> Active:0)
> (XEN) IOAPIC[0]: Set PCI routing entry (8-15 -> 0x90 -> IRQ 15 Mode:0 
> Active:0)
> (XEN) Pin 8-9 already programmed

Dom0 have a console.

> [    0.000000] Linux version 2.6.32-4-xen-amd64 (Debian 2.6.32-10~xen.1) 
> (waldi@xxxxxxxxxx) (gcc version 4.3.4 (Debian 4.3.4-8) ) #1 SMP Tue Mar 16 
> 07:46:55 UTC 2010

ACPI only reports overrides for 2 and 9.

> [    0.000000] Already setup the GSI :0
> [    0.000000] Already setup the GSI :1
> [    0.000000] Already setup the GSI :2
> [    0.000000] Already setup the GSI :3
> [    0.000000] Already setup the GSI :4
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
> [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
> [    0.000000] xen: sci override: source_irq=9 global_irq=9 trigger=c 
> polarity=3
> [    0.000000] xen_allocate_pirq: returning irq 9 for gsi 9
> [    0.000000] Already setup the GSI :9
> [    0.000000] xen: acpi sci 9

Readout after dom0 booted. Several other pins masked, all set to edge.

> (XEN)  NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   
> (XEN)  00 000 00  1    0    0   0   0    0    0    00
> (XEN)  01 009 09  0    0    0   0   0    0    0    81
> (XEN)  02 000 00  0    0    0   0   0    0    0    F0
> (XEN)  03 000 00  0    0    0   0   0    0    0    30
> (XEN)  04 000 00  0    0    0   0   0    0    0    F1
> (XEN)  05 000 00  1    0    0   0   0    0    0    38
> (XEN)  06 000 00  1    0    0   0   0    0    0    40
> (XEN)  07 000 00  1    0    0   0   0    0    0    48
> (XEN)  08 009 09  0    0    0   0   0    0    0    89
> (XEN)  09 000 00  0    0    0   0   0    0    0    58
> (XEN)  0a 000 00  1    0    0   0   0    0    0    60
> (XEN)  0b 000 00  1    0    0   0   0    0    0    68
> (XEN)  0c 009 09  0    0    0   0   0    0    0    79
> (XEN)  0d 000 00  1    0    0   0   0    0    0    78
> (XEN)  0e 000 00  1    0    0   0   0    0    0    88
> (XEN)  0f 000 00  1    0    0   0   0    0    0    90

Load of driver which drives interrupt 14. It tries to reprogram it as
level driven.

> [   43.620022] xen_allocate_pirq: returning irq 14 for gsi 14
> (XEN) Pin 8-14 already programmed
> (XEN) IOAPIC[0]: Set PCI routing entry (8-14 -> 0x88 -> IRQ 14 Mode:1 
> Active:1)

Readout after.

> (XEN)  NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   
> (XEN)  00 000 00  1    0    0   0   0    0    0    00
> (XEN)  01 009 09  0    0    0   0   0    0    0    81
> (XEN)  02 000 00  0    0    0   0   0    0    0    F0
> (XEN)  03 000 00  0    0    0   0   0    0    0    30
> (XEN)  04 000 00  0    0    0   0   0    0    0    F1
> (XEN)  05 000 00  1    0    0   0   0    0    0    38
> (XEN)  06 000 00  1    0    0   0   0    0    0    40
> (XEN)  07 000 00  1    0    0   0   0    0    0    48
> (XEN)  08 009 09  0    0    0   0   0    0    0    89
> (XEN)  09 000 00  0    0    0   0   0    0    0    58
> (XEN)  0a 000 00  1    0    0   0   0    0    0    60
> (XEN)  0b 000 00  1    0    0   0   0    0    0    68
> (XEN)  0c 009 09  0    0    0   0   0    0    0    79
> (XEN)  0d 000 00  1    0    0   0   0    0    0    78
> (XEN)  0e 008 08  0    1    0   1   0    0    0    B2
> (XEN)  0f 000 00  1    0    0   0   0    0    0    90

I did some digging and found similar code that disallows
reprogramming of IO-APIC pins in
arch/x86/kernel/apic/io_apic.c:io_apic_set_pci_routing
So this behaviour is correct.

So the question is: Is it wrong for the kernel to do register_gsi calls
early in bootup for interrupts it does not know anything about?

Bastian

-- 
Even historians fail to learn from history -- they repeat the same mistakes.
                -- John Gill, "Patterns of Force", stardate 2534.7

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

<Prev in Thread] Current Thread [Next in Thread>