aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-09 03:08:56 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-09 03:08:56 +0000
commit0e21e12bb311c4c1095d0269dc2ef81196ccb60a (patch)
treeb0e7951d83aa0480c62713f665d487efdbf57cea /hw/pc.c
parentaacb758b65e7f98133f9425b2c8a80ae339c3877 (diff)
Don't route PIC interrupts through the local APIC if the local APIC
config says so. By Ari Kivity. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3371 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 5bc0b63e79..c561cbf2e6 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -93,6 +93,9 @@ int cpu_get_pic_interrupt(CPUState *env)
return intno;
}
/* read the irq from the PIC */
+ if (!apic_accept_pic_intr(env))
+ return -1;
+
intno = pic_read_irq(isa_pic);
return intno;
}
@@ -100,10 +103,8 @@ int cpu_get_pic_interrupt(CPUState *env)
static void pic_irq_request(void *opaque, int irq, int level)
{
CPUState *env = opaque;
- if (level)
+ if (level && apic_accept_pic_intr(env))
cpu_interrupt(env, CPU_INTERRUPT_HARD);
- else
- cpu_reset_interrupt(env, CPU_INTERRUPT_HARD);
}
/* PC cmos mappings */