level triggered IRQ fix (Steve Wormley)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1078 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/i8259.c b/hw/i8259.c
index c21f0d3..221506b 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -188,7 +188,9 @@
     } 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)