aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/pc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/pc.c b/hw/pc.c
index f20944afee..08e0fb6cae 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -118,17 +118,19 @@ static void pic_irq_request(void *opaque, int irq, int level)
{
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);
}
}