diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-04-13 16:08:30 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-04-13 16:08:30 +0000 |
commit | a5b38b5171ea46e13612a3471a7cc735db6d6f72 (patch) | |
tree | 5338204d428075942f1fb80e930c3725a67a1956 /hw/pc.c | |
parent | e2eb9d3e9192800e0526e88c186cecda4529d307 (diff) |
x86: Rework local IRQ delivery for APICs
(Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4207 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -113,9 +113,16 @@ int cpu_get_pic_interrupt(CPUState *env) static void pic_irq_request(void *opaque, int irq, int level) { - CPUState *env = opaque; - if (level && apic_accept_pic_intr(env)) - cpu_interrupt(env, CPU_INTERRUPT_HARD); + CPUState *env = first_cpu; + + if (!level) + return; + + while (env) { + if (apic_accept_pic_intr(env)) + apic_local_deliver(env, APIC_LINT0); + env = env->next_cpu; + } } /* PC cmos mappings */ @@ -845,7 +852,7 @@ static void pc_init1(int ram_size, int vga_ram_size, if (linux_boot) load_linux(kernel_filename, initrd_filename, kernel_cmdline); - cpu_irq = qemu_allocate_irqs(pic_irq_request, first_cpu, 1); + cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1); i8259 = i8259_init(cpu_irq[0]); ferr_irq = i8259[13]; |