From: "andysycrane@gmail.com" <andysycrane@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Rempel, Cynthia" <cynt6007@vandals.uidaho.edu>
Subject: [Qemu-devel] How to add a IRQ to QEMU
Date: Mon, 29 Jul 2013 10:19:34 +0800 [thread overview]
Message-ID: <2013072910193137593912@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
Hi, all
I want to add a pci device just like pci-serial to QEMU, there are some qeustion while add a IRQ.
In the init() function,
pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
s->irq = pci->dev.irq[0];
In the write() function
qemu_irq_raise(s->irq);
if (val & 0xff) == 0x99)
qemu_irq_low(s->irq);
What i want to do is generate an interrupt when write to io port, and then the interrupt routine in Linux will response this IRQ. And write 0x99 , then the qemu_irq_low(s->irq); will be called. However, the interrupt routine is called all the time.
What's the problem? What's the correct routine to add an interrupt?
Thanks.
andysycrane@gmail.com
[-- Attachment #2: Type: text/html, Size: 1734 bytes --]
reply other threads:[~2013-07-29 2:19 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=2013072910193137593912@gmail.com \
--to=andysycrane@gmail.com \
--cc=cynt6007@vandals.uidaho.edu \
--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).