tool: detect duplicate I/O APIC IRQs and MSIs - #600
Conversation
| } | ||
|
|
||
| impl Ord for PciDevice { | ||
| fn cmp(&self, other: &Self) -> Ordering { |
There was a problem hiding this comment.
Is this needed because the capDL tool doesn't have Cmp on object::PCIDevice?
There was a problem hiding this comment.
Yea that's right
There was a problem hiding this comment.
Don't want to block this PR, but should we add a comment and fix it upstream?
There was a problem hiding this comment.
We could, but I'm not sure if there are negative implications if we add derives that the upstream code themselves don't use.
There was a problem hiding this comment.
Nah, it will be dead-code eliminated quite easily.
f88cf4b to
238641d
Compare
|
One I/O APIC IRQ number can be only mapped to one vector, but it is possible to share same I/O APIC IRQ number among multiple PCI devices, which means the same IRQ might need to be mapped to at least two driver PDs. |
Sure
I don't think the kernel allow you to do this, |
|
Even if the kernel allowed it, you still can't tell which PD the interrupt is for, you need device knowledge for that, which requires either broadcast or some driver-level knowledge: so to replicate it on seL4 you need an intermediary PD. (Possibly we should document this pattern somewhere?) |
We could make an example? |
8b80405 to
b59153d
Compare
If you create multiple IRQ elements in the SDF with different vectors but the same I/O APIC or PCI device source, the kernel will silently overwrite all of those with the element that is processed last by the capDL initialiser at runtime. We should guard against this footgun by reporting an error in the tool. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
b59153d to
39a538a
Compare
If you create multiple IRQ elements in the SDF with different vectors but the same I/O APIC or PCI device source, the kernel will silently overwrite all of those with the element that is processed last by the capDL initialiser at runtime.
We should guard against this footgun by reporting an error in the tool.
Closes #598.
Related: seL4/seL4#1748.