Skip to contentSkip to conversation

Interrupt forwarding

DISCUSSION Jon Smirl 4 participants 7 messages Mar 12, 2005 – Mar 14, 2005

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

The subject of interrupt forwarding just came up on lkml. How is this dealt with in Xen? I'm not currently a Xen user so I may be misunderstanding how it works. In Xen I believe you can assign a piece of hardware for exclusive use from a domain. How does this work for shared interrupts, what if the domain receiving the interrupt dies and can't acknowledge it?

Here's my comment from lkml....

Quoted 23 lines · Jon Smirl

I've tried implementing this before (on UML) and could not get around the interrupt problem. Most interrupts on the x86 architecture are shared. Disabling the IRQ at the PIC blocks all of the shared IRQs. This works (hope your userspace handler is last on the shared handler list) until you have a problem in userspace.

Once you have a problem in userspace there is no way to acknowledge the interrupt anymore. I tried to address that by maintaining a timer and suspending the hardware through the D0 state to reset it. That had some success. Not acknowledging the interrupt results in an interrupt loop and reboot.

The problem can be mitigated by choosing what slot your hardware to put your hardware in. This can reduce the number of shared interrupts. If you can get exclusive use of the interrupt this method will work.

If I were designing a new bus I would make interrupt acknowledge part of PCI config space in order to allow a single piece of code to acknowledge them. Since we can't change the bus the only safe way to do this is to build a hardware specific driver for each device to acknowledge the interrupt.

Bottom line is that I could find no reliable solution for handing interrupts.

Signature · 9 lines
Jon Smirl
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#1 lore raw
Quoted 5 lines
Quoted 5 lines

If I were designing a new bus I would make interrupt acknowledge part of PCI config space in order to allow a single piece of code to acknowledge them. Since we can't change the bus the only safe way to do this is to build a hardware specific driver for each device to acknowledge the interrupt.

I believe this problem is eliminated under PCI express, since interrupts are message-based.

Cheers,
Mark

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw
Quoted 2 lines · Mark Williamson

I believe this problem is eliminated under PCI express, since interrupts are message-based.

I got corrected on this in the openib mailing list :-)

the message signalled interrupts are even available on older hardware, it seems; sometimes but not always.

That doesn't help much but it is interesting ...

ron

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#3 lore raw
Quoted 8 lines · Ronald G. Minnich
Quoted 2 lines · Mark Williamson

I believe this problem is eliminated under PCI express, since interrupts are message-based.

I got corrected on this in the openib mailing list :-)

the message signalled interrupts are even available on older hardware, it seems; sometimes but not always.

I'd seen they're available on some non-PCIE hardware. I assumed it was just recent / high end hardware (maybe just on PCI-X). (for instance, I think my workstation at Intel does use MSI interrupts and IIRC has PCI / PCI-X support).

Does anyone know to what extent MSI is actually used these days?

Quoted 1 line

That doesn't help much but it is interesting ...

Interesting indeed...

Cheers,
Mark

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#4 lore raw
Quoted 1 line · Mark Williamson

Does anyone know to what extent MSI is actually used these days?

from what I've seen people are really starting to count on it. It was an issue in openib that the AMD 8131 did not support MSE on PCI-X

ron

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#5 lore raw
Quoted 8 lines · Ronald G. Minnich
Quoted 1 line · Mark Williamson

Does anyone know to what extent MSI is actually used these days?

from what I've seen people are really starting to count on it. It was an issue in openib that the AMD 8131 did not support MSE on PCI-X

MSI

sorry

ron

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#6 lore raw
In reply to Mark Williamson
Quoted 7 lines · Mark Williamson

I'd seen they're available on some non-PCIE hardware. I assumed it was just recent / high end hardware (maybe just on PCI-X). (for instance, I think my workstation at Intel does use MSI interrupts and IIRC has PCI / PCI-X support).

Does anyone know to what extent MSI is actually used these days?

Not very widely. The PCI card and the chipset has to support it. Most PCI cards don't. Non Intel chipsets often don't support MSI at all (e.g. on most AMD systems). Worst there are even some cards who advertise MSI support, but they lock up when you actually use it.

PCI-Express requires MSI support though, but there are hardly any PCI-Express cards already available.

MSI-X support is even worse, only a few highend cards seem to support it.

Also the MSI support in Linux seems to be not entirely stable yet.

-Andi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click