level triggered IRQ fix (Steve Wormley)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 29 Sep 2004 21:55:52 +0000 (21:55 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 29 Sep 2004 21:55:52 +0000 (21:55 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1078 c046a42c-6fe2-441c-8c8c-71466251a162

hw/i8259.c

index c21f0d30608c16a82f6fc9a9f2739715d8abf70e..221506b28f7864a37a5ee8ef456421e49e2d44c0 100644 (file)
@@ -188,7 +188,9 @@ static inline void pic_intack(PicState *s, int irq)
     } else {
         s->isr |= (1 << irq);
     }
-    s->irr &= ~(1 << irq);
+    /* We don't clear a level sensitive interrupt here */
+    if (!(s->elcr & (1 << irq)))
+        s->irr &= ~(1 << irq);
 }
 
 int cpu_get_pic_interrupt(CPUState *env)