From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlOQn-0002xn-WC for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:45:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlOQj-0002tr-1e for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:45:57 -0400 Received: from [199.232.76.173] (port=59665 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlOQi-0002ta-Qz for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:45:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64398) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlOQi-0004eV-9I for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:45:52 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n89EjpjV009845 for ; Wed, 9 Sep 2009 10:45:51 -0400 From: Gerd Hoffmann Date: Wed, 9 Sep 2009 16:45:36 +0200 Message-Id: <1252507547-11398-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1252507547-11398-1-git-send-email-kraxel@redhat.com> References: <1252507547-11398-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 01/12] isapc: Fix irq routing List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Only send irqs to ioapic in case we have one. Fixes qemu segfault. Signed-off-by: Gerd Hoffmann --- hw/pc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 6292001..9af0cdb 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) -- 1.6.2.5