From: LIU Zhiwei <zhiwei_liu@c-sky.com>
To: qemu-devel@nongnu.org
Subject: Questions about qtest on interrupt controller
Date: Thu, 25 Mar 2021 10:37:31 +0800 [thread overview]
Message-ID: <cfae615f-171b-d90b-6ea3-46989bd958d6@c-sky.com> (raw)
[-- 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) {
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
[-- Attachment #2: Type: text/html, Size: 2219 bytes --]
reply other threads:[~2021-03-25 2:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfae615f-171b-d90b-6ea3-46989bd958d6@c-sky.com \
--to=zhiwei_liu@c-sky.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).