]> Git Repo - qemu.git/blobdiff - hw/i8259.c
initial APIC support (only for x86_64 target now)
[qemu.git] / hw / i8259.c
index c21f0d30608c16a82f6fc9a9f2739715d8abf70e..8f1821d97f883d74e944e60cc859c9310ebc7dba 100644 (file)
@@ -188,13 +188,24 @@ 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)
 {
     int irq, irq2, intno;
 
+#ifdef TARGET_X86_64
+    intno = apic_get_interrupt(env);
+    if (intno >= 0) {
+        /* set irq request if a PIC irq is still pending */
+        /* XXX: improve that */
+        pic_update_irq(); 
+        return intno;
+    }
+#endif
     /* read the irq from the PIC */
 
     irq = pic_get_irq(&pics[0]);
This page took 0.025266 seconds and 4 git commands to generate.