riscv / riscv-aia

https://jira.riscv.org/browse/RVG-59
Creative Commons Attribution 4.0 International
81 stars 19 forks source link

Does interrupts have priority when aplic forward through MSI? How to send MSI if 1023 interrupts arrive simultaneously #60

Closed vang2333 closed 8 months ago

jhauser-us commented 10 months ago

When an APLIC interrupt domain is configured for MSI delivery, no priority is specified among the enabled-and-pending interrupts. If 1023 interrupts arrive simultaneously, they may be forwarded in any order.

The example APLIC that is in development prefers to forward lower-numbered interrupts first, but that is simply one choice among many allowed possibilities.

I would recommend that an APLIC implementation at least try to ensure that all interrupts get forwarded eventually. But the APLIC spec says nothing about how long this might take. (Just as the RISC-V ISA spec says nothing about how long it takes to execute each instruction.) The speed of MSI forwarding is entirely a quality-of-implementation issue.