Hi folks,
Currently, I am writing an interrupt controller (CLIC) for RISC-V. I
can't find a good way to process edge-triggered interrupt.
According to edge-triggered definition, if I select an edge-triggered
interrupt to serve , it will clean its pending status. However after
serving the interrupt, there is no chance to select other pending
interrupts.
I have two methods.
1. One is to add a timer for interrupt controller, so that every
pending interrupt can be served at some point.
2. The other is that always pull a pending interrupt to serve at the
interrupt return instruction.
But both are not so good. The first one we can not server the interrupts
immediately. The second one we have to add some
code when executing the guest code.
I want to know if there is a better way to handle edge-triggered
interrupt on QEMU.
Thanks very much for your reading and look forward to your response.
Zhiwei