From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlgBv-0008T4-0z for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlgBp-0008QG-9D for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:45 -0400 Received: from [199.232.76.173] (port=39536 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlgBo-0008Pt-Sf for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45173) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlgBo-0005UR-9j for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:40 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8A9hcXn030001 for ; Thu, 10 Sep 2009 05:43:38 -0400 From: Gerd Hoffmann Date: Thu, 10 Sep 2009 11:43:23 +0200 Message-Id: <1252575815-7824-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1252575815-7824-1-git-send-email-kraxel@redhat.com> References: <1252575815-7824-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH v2 01/13] 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