qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] How to add a IRQ to QEMU
@ 2013-07-29  2:19 andysycrane
  0 siblings, 0 replies; only message in thread
From: andysycrane @ 2013-07-29  2:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Rempel, Cynthia

[-- 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 --]

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

only message in thread, other threads:[~2013-07-29  2:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29  2:19 [Qemu-devel] How to add a IRQ to QEMU andysycrane

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).