diff options
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -121,10 +121,14 @@ static void pic_irq_request(void *opaque, int irq, int level) if (!level) return; - while (env) { - if (apic_accept_pic_intr(env)) - apic_local_deliver(env, APIC_LINT0); - env = env->next_cpu; + if (env->apic_state) { + 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); } } |