qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Questions about qtest on interrupt controller
@ 2021-03-25  2:37 LIU Zhiwei
  0 siblings, 0 replies; only message in thread
From: LIU Zhiwei @ 2021-03-25  2:37 UTC (permalink / raw)
  To: qemu-devel

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

Hi folks,

When I am writing  qtest  cases for an interrupt controller,  I 
encounter some problems.

*1) Can't intercept both the irq in and irq out for the same device.*

It's a necessary feature for an interrupt controller qtest. However, as 
you can see  from qtest.c,  when a device has intercepted irq out or irq 
in, it can't intercept another.

" if (irq_intercept_dev) {


             if (irq_intercept_dev != dev) {

                 qtest_send(chr, "FAIL IRQ intercept already enabled\n");

             } else {

                 qtest_send(chr, "OK\n");


             return; }


In my opinion,  this code in qtest is protecting from intercepting irqs 
repeatedly. But irq in and out are different directions, they should be 
intercepted simultaneously. Is it right?

*2) Can't get  the right IRQ num.*

If  I  intercept an IRQ out,  I can get the num of IRQ if the IRQ 
raises, .  But the really IRQ I want to get is the IRQ that the 
interrupt controller selected out. However I can't get this IRQ from 

Are there already some methods to surmount these problems?  Any advice 
is well appreciated. Thanks very much.


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-25  2:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25  2:37 Questions about qtest on interrupt controller 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).