aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-10 11:43:23 +0200
committermalc <av1474@comtv.ru>2009-09-10 19:47:57 +0400
commit2c8d9340203c7f19265fd4cb2341f568217a3af6 (patch)
tree906eb10ec34e1cd7671d42f16ff03da42bd576bc
parentc4a735f9cbae68f4c12f77bb3d532e8c54cb5962 (diff)
isapc: Fix irq routing
Only send irqs to ioapic in case we have one. Fixes qemu segfault. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--hw/pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 6292001373..9af0cdb0da 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -100,7 +100,8 @@ static void isa_irq_handler(void *opaque, int n, int level)
if (n < 16) {
qemu_set_irq(isa->i8259[n], level);
}
- qemu_set_irq(isa->ioapic[n], level);
+ if (isa->ioapic)
+ qemu_set_irq(isa->ioapic[n], level);
};
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)