From patchwork Tue Sep 8 15:31:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 33136 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 2E5BBB6F20 for ; Wed, 9 Sep 2009 01:31:52 +1000 (EST) Received: from localhost ([127.0.0.1]:59345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ml2fa-0003Bn-Pt for incoming@patchwork.ozlabs.org; Tue, 08 Sep 2009 11:31:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ml2fD-0003Bd-8O for qemu-devel@nongnu.org; Tue, 08 Sep 2009 11:31:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ml2f8-0003BR-NL for qemu-devel@nongnu.org; Tue, 08 Sep 2009 11:31:22 -0400 Received: from [199.232.76.173] (port=46942 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ml2f8-0003BO-JM for qemu-devel@nongnu.org; Tue, 08 Sep 2009 11:31:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ml2f7-0008LA-Gr for qemu-devel@nongnu.org; Tue, 08 Sep 2009 11:31:18 -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 n88FVE9W027646 for ; Tue, 8 Sep 2009 11:31:15 -0400 Received: from zweiblum.home.kraxel.org (vpn2-9-72.ams2.redhat.com [10.36.9.72]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n88FVDix025712; Tue, 8 Sep 2009 11:31:13 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 199F5700DD; Tue, 8 Sep 2009 17:31:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 8 Sep 2009 17:31:10 +0200 Message-Id: <1252423870-19798-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] Fix -M isapc 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. Linux kernel still needs explicit noapic noacpi on the kernel cmd line to boot. Do we need a different bios for isapc? Or a fw_cfg knob to turn off all the modern stuff (apic, acpi, smp, ...)? 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)