Skip to contentSkip to conversation

[5040] De-assert ISA PIC IRQs properly

Qemu-devel Aurelien Jarno 1 participant 1 message Aug 21, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5040

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5040
Author:   aurel32
Date:     2008-08-21 03:14:41 +0000 (Thu, 21 Aug 2008)

Log Message:
-----------
De-assert ISA PIC IRQs properly

[ Taking latest isapc changes into account. ]

In case the PIC IRQ gets de-asserted on an isapc machine, we also have to reset CPU_INTERRUPT_HARD. This is what older qemu (before the routing-through-APIC changes) used to do as well.

Modified Paths:
--------------
trunk/hw/pc.c

Modified: trunk/hw/pc.c
===================================================================

hw/pc.c +6 -4
@@ -118,17 +118,19 @@
 {
     CPUState *env = first_cpu;
 
-    if (!level)
-        return;
-
     if (env->apic_state) {
+        if (!level)
+            return;
         while (env) {
             if (apic_accept_pic_intr(env))
                 apic_local_deliver(env, APIC_LINT0);
             env = env->next_cpu;
         }
     } else {
-        cpu_interrupt(env, CPU_INTERRUPT_HARD);
+        if (level)
+            cpu_interrupt(env, CPU_INTERRUPT_HARD);
+        else
+            cpu_reset_interrupt(env, CPU_INTERRUPT_HARD);
     }
 }