From patchwork Thu Sep 10 09:43:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 33296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 32600B6F1E for ; Thu, 10 Sep 2009 20:21:32 +1000 (EST) Received: from localhost ([127.0.0.1]:39715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlgmP-0000fc-2U for incoming@patchwork.ozlabs.org; Thu, 10 Sep 2009 06:21:29 -0400 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 Received: from zweiblum.home.kraxel.org (vpn2-9-74.ams2.redhat.com [10.36.9.74]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n8A9hbH6008202; Thu, 10 Sep 2009 05:43:37 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id B07B0700E3; Thu, 10 Sep 2009 11:43:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 01/13] isapc: Fix irq routing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)