From patchwork Tue Jun 28 17:33:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 641645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rfCkP37JKz9snm for ; Wed, 29 Jun 2016 03:40:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fTAt0lTs; dkim-atps=neutral Received: from localhost ([::1]:38439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHwzb-0007G0-9r for incoming@patchwork.ozlabs.org; Tue, 28 Jun 2016 13:40:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHwuL-0000cW-8b for qemu-devel@nongnu.org; Tue, 28 Jun 2016 13:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHwuK-00036T-Aw for qemu-devel@nongnu.org; Tue, 28 Jun 2016 13:34:45 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:32821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHwuK-000368-4W for qemu-devel@nongnu.org; Tue, 28 Jun 2016 13:34:44 -0400 Received: by mail-wm0-x244.google.com with SMTP id r201so7670060wme.0 for ; Tue, 28 Jun 2016 10:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=6WbMOwtLOc/EzSEd02tPNTVDVz2mHd9mP4dq8AhhqFs=; b=fTAt0lTs+58h+Q3nVo3LlPt3uI18SUG8ELvTLTSYBhA5/OMXjC516pZmJs3uoTbpMr Y8D6XGjDaSbsd4a7euBsDdsbku6oq9mv7DM8gFm63u/SwjHT66uNbFaHgEcHgB3LOdHW X2p+8kJKtt5z08DIunqDuPKy5bhXaVRiVYixf+Z4ajbXG2QAruu9+PEoH9XQ7oe7t3vZ OYISUBd+ony7wvY/wgHDAUv+6rz1df0vtlbs04GabMRrp2frjsV4IZqX5Vi0wXcN0sMP C91Q8IQFDcNxG79PtOHXW6dXq2xR+8V7H+1bmBV7msy2Sz3QABVKHgI448vOmQyvKHbE 0JVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=6WbMOwtLOc/EzSEd02tPNTVDVz2mHd9mP4dq8AhhqFs=; b=CP/KbgQyVs3PsaZ9Z1s9Ffgp8FfHyiUq0zg/ZyYd0zj+K4GVzKK26D4FRamDl90jqx ojbHMDcte07IIhkkjdC7MrCq2qdE92NiLldS/nE8TL8/FFKhqTYXShbMCD6iL9Vh4mZa fO457mSMK4NugamfZRIAQAQWUI+DP8CRl6k6py6nAT3gYc4/dJON69VfVPy7v2gPgEVY W96olcQw8I4IMyN+8WbSwGVQPkeStNtf5lFLDkQeQrgajIw5YDnK66vGG8H0TV8aLLu4 D3oTTHF9vXgFPcG73Kv8jCewJfDsyyUpZeIFfYnyK3VZ/fBaFMTM5Dmkjm+juzc8IgN0 iv8w== X-Gm-Message-State: ALyK8tI4bqBCT9sVRvLgEl9dOsiUfz5uOI/i6MYaHt86qpTRZWwNr4se8oJTr8kLJSt+2g== X-Received: by 10.194.136.72 with SMTP id py8mr4294900wjb.126.1467135283461; Tue, 28 Jun 2016 10:34:43 -0700 (PDT) Received: from donizetti.lan (94-39-188-118.adsl-ull.clienti.tiscali.it. [94.39.188.118]) by smtp.gmail.com with ESMTPSA id c142sm5305wme.18.2016.06.28.10.34.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 10:34:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 28 Jun 2016 19:33:44 +0200 Message-Id: <1467135242-874-15-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467135242-874-1-git-send-email-pbonzini@redhat.com> References: <1467135242-874-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 14/32] ICH9 LPC: move call of isa_bus_irqs to 'realize' method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Efimov Vasily Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Efimov Vasily The isa_bus_irqs function initializes ISA bus IRQ array pointer with specified value. Previously the ICH9 LPC bridge model did not have its own IRQs but only IRQ pointer cache. And same GSI were used for ISA bus and other sources behind the bridge (PCI, SCI). Hence, the pc_q35_init was only possible place to setup both ISA bus IRQs and the bridge IRQ cache. As a result, the call of isa_bus_irqs was made from pc_q35_init. Now the ICH9 LPC bridge has its own output IRQs which are connected to GSI. The output IRQs are already used to route IRQs from PCI and SCI. The patch makes the ICH9 LPC bridge output IRQs to used for ISA bus too. Signed-off-by: Efimov Vasily Signed-off-by: Paolo Bonzini --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 17634dd..04b2684 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -200,9 +200,6 @@ static void pc_q35_init(MachineState *machine) pci_bus_set_route_irq_fn(host_bus, ich9_route_intx_pin_to_irq); isa_bus = ich9_lpc->isa_bus; - /*end early*/ - isa_bus_irqs(isa_bus, gsi); - if (kvm_pic_in_kernel()) { i8259 = kvm_i8259_init(isa_bus); } else if (xen_enabled()) { diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 59f15a1..fe0ba83 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -629,6 +629,8 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) 1); qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, GSI_NUM_PINS); + + isa_bus_irqs(isa_bus, lpc->gsi); } static bool ich9_rst_cnt_needed(void *opaque)