qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Question about edge-triggered interrupt
@ 2021-03-11  2:57 LIU Zhiwei
  2021-03-11  9:33 ` Peter Maydell
  0 siblings, 1 reply; 12+ messages in thread
From: LIU Zhiwei @ 2021-03-11  2:57 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]

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



[-- Attachment #2: Type: text/html, Size: 1271 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-12 10:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11  2:57 Question about edge-triggered interrupt LIU Zhiwei
2021-03-11  9:33 ` Peter Maydell
2021-03-11 12:59   ` LIU Zhiwei
2021-03-11 13:17     ` Peter Maydell
2021-03-11 16:01       ` LIU Zhiwei
2021-03-11 16:07         ` Peter Maydell
2021-03-11 16:39           ` LIU Zhiwei
2021-03-11 16:50             ` Peter Maydell
2021-03-12  9:19               ` LIU Zhiwei
2021-03-12 10:05                 ` Peter Maydell
2021-03-11 20:45         ` Alistair Francis
2021-03-12  9:06           ` LIU Zhiwei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).