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.




andysycr...@gmail.com

Reply via email to