qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions about qtest on interrupt controller


From: LIU Zhiwei
Subject: Questions about qtest on interrupt controller
Date: Thu, 25 Mar 2021 10:37:31 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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) {
            qtest_send_prefix(chr);
            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 qtest_irq_handler.

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

Zhiwei



reply via email to

[Prev in Thread] Current Thread [Next in Thread]