|
From: | address@hidden |
Subject: | [Qemu-devel] How to add a IRQ to QEMU |
Date: | Mon, 29 Jul 2013 10:19:34 +0800 |
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.
address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |