Prevent IRQ sharing for PCI passthrough
Hello List,
please don't shout at me if the answer to my question is too obvious, but in the German Linux Magazine I read an article about passing PCI devices to KVM guests and the authors said that "shared interrupt funcionality has to be disabled" which I read as "it is possible to disable shared interrupt functionality".
I currently have the problem with a PCI ISDN card that is not MSI capable and even if I change the PCI slot and disable all other slots, USB etc. in the BIOS, that card still shares its interrupt with three other devices.
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.
Best regards,
Dirk
Quoted 4 lines · Dirk Gouders
Hello List,
please don't shout at me if the answer to my question is too obvious,
We won't shout at you.
Quoted 5 lines
but in the German Linux Magazine I read an article about passing PCI devices to KVM guests and the authors said that "shared interrupt funcionality has to be disabled" which I read as "it is possible to disable shared interrupt functionality".
It would be more correct to say "no go with shared host interrupts".
Quoted 11 lines
I currently have the problem with a PCI ISDN card that is not MSI capable and even if I change the PCI slot and disable all other slots, USB etc. in the BIOS, that card still shares its interrupt with three other devices.
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.
There is an ACPI _SRS method which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices).
Chris?
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 25 lines · * Avi Kivity ([email protected]) wrote:
Quoted 3 lines · Dirk Gouders
Hello List,
please don't shout at me if the answer to my question is too obvious,
We won't shout at you.
Quoted 4 lines
but in the German Linux Magazine I read an article about passing PCI devices to KVM guests and the authors said that "shared interrupt funcionality has to be disabled" which I read as "it is possible to disable shared interrupt functionality".
It would be more correct to say "no go with shared host interrupts".
Quoted 10 lines
I currently have the problem with a PCI ISDN card that is not MSI capable and even if I change the PCI slot and disable all other slots, USB etc. in the BIOS, that card still shares its interrupt with three other devices.
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.
Quoted 5 lines
There is an ACPI
_SRSmethod which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices).
The only way to work around this is to unbind the other drivers that are sharing that interrupt. This may not work if the other devices are critical to you system (it's typically sharing w/ USB Host Controller).
Otherwise, we can't support this mode easily (there is some work in progress to allow this to work if your ISDN device is PCI 2.3 compliant).
thanks,
-chris
Quoted 10 lines
Quoted 6 lines
There is an ACPI
_SRSmethod which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices).The only way to work around this is to unbind the other drivers that are sharing that interrupt. This may not work if the other devices are critical to you system (it's typically sharing w/ USB Host Controller).
Thanks for the hint. I will try if I can produce a situation where the card shares it's interrupt with unused devices.
Dirk
Quoted 8 lines
Quoted 7 lines
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.
Quoted 4 lines
There is an ACPI
_SRSmethod which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices).
You mean by providing a custom DSDT, right?
A quick look in drivers/acpi/pci_link.c shows a TBD comment mentioning _SRS but I will have to have a deeper look at this subject, because its quite new to me.
Thanks for your answer,
Dirk
Quoted 13 lines · Dirk Gouders
Quoted 8 lines
Quoted 8 lines
Even after extensive searching/reading, I am not sure if it possible to prevent a PCI card from sharing an interrupt with other devices or probably manually assign a free interrupt to that card via some kernel parameter and would be glad if someone could give me an answer to that question.
Quoted 5 lines
There is an ACPI
_SRSmethod which can be used to move interrupts around. However Linux doesn't appear to expose it. Even if it did, the interrupt may be shared on the motherboard, in which case nothing would help (though you might be able to share it with unused devices).
Quoted 6 lines
You mean by providing a custom DSDT, right?
A quick look indrivers/acpi/pci_link.cshows a TBD comment mentioning_SRSbut I will have to have a deeper look at this subject, because its quite new to me.
No, there should be an _SRS method in your existing DSDT. But Linux doesn't call it (except after resume etc.) and doesn't allow the user to use _SRS to move interrupts around.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.