From nobody Wed Nov 27 20:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697645160; cv=none; d=zohomail.com; s=zohoarc; b=LX87+3AQxpRFhQDbrrnDYjOfpAKrFc4JuWpQeog/avspx+vZuPkzgknHCeC0kmvDI3xwiturm4KB/4dEt5NooIt3zxZZInHF4LFKNamxhOrDs7dL0j7H4AuHONcEBs/cMkGP4E0PSdTgZwi1t+nda/gzDC8ShlqA9dakjzd2leI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697645160; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uLW4nacuIeTJ5EH0RbV4BQZpdBCvivCuyeSzP1OfKNM=; b=cMW7DLUCa1v8eKkEBqjaNP55ghHqjBQitZlZWDxSjg9uO+9fvcwUVbxfAwCVm1nNG5gezV6BPxeamwVmG6I48qjGW4k7ykJE+Oj/ypQtl6g5Xw5XbQekD6DIfyg5O/TeB+uPGSUbQgJWCihlWWYrB1ewJlsphBu+EPDBThbuj0M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697645160714221.29240784770104; Wed, 18 Oct 2023 09:06:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt8wz-0001UT-JW; Wed, 18 Oct 2023 11:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt8vF-0005JS-H0 for qemu-devel@nongnu.org; Wed, 18 Oct 2023 11:57:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt8vD-0007J0-TB for qemu-devel@nongnu.org; Wed, 18 Oct 2023 11:57:25 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-iCJRQtHZPda8w0ahRN18Uw-1; Wed, 18 Oct 2023 11:57:21 -0400 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40566c578b7so50252355e9.0 for ; Wed, 18 Oct 2023 08:57:21 -0700 (PDT) Received: from redhat.com ([2a02:14f:1f2:2037:f34:d61b:7da0:a7be]) by smtp.gmail.com with ESMTPSA id f12-20020adfb60c000000b00318147fd2d3sm2385909wre.41.2023.10.18.08.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697644643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uLW4nacuIeTJ5EH0RbV4BQZpdBCvivCuyeSzP1OfKNM=; b=c1cSMVqWC0dXTI64PjN3M/sSh4SBc2X27TaHEPV3DfXeKTYc0WYw27VQh5/CpwGvwnUWaw vGCDOkFzTtXt1SVb8DiMsZuHIfiMPK0BMf/X46CsrGJ4S1JEkMDMX/AC6J5weownaPcz17 gg2DTdgMQpnrdrF2gdQFmH2CLgLFT/E= X-MC-Unique: iCJRQtHZPda8w0ahRN18Uw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697644640; x=1698249440; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uLW4nacuIeTJ5EH0RbV4BQZpdBCvivCuyeSzP1OfKNM=; b=lCkCQ3Tn+Lf5iBIbnk4Tzz4dR6u3L4yqTvAdZKva6NvEGXONAppfGwSvNuZIjarS6N r0BZ8+oJ5pjLqLgIsXGWU8WPbdeetqKHBbyFiKaPmRcMJ1l3Y+1swMzO/qggUzDef+4x Ps+xFVlG/8/0byE/WjbdTWr1U6ediVzQx80/DbJURXCXStN30phKBqpjL11YiIv/ePxi RiMBYZd8OIwOpaJl9Rb7pEwPRYjj4TDdNY7QfcidezLh2zR8y6dpxcihW8vUCKVlR0OA 1IIyRlPU6wYgjR8I2ZydVPB/F0XseCdHjyH13eKjQ3io4C4/lbVQuVfCnQv6FeIBaZyn KO+A== X-Gm-Message-State: AOJu0Yxmxy4aE81NNK/H3ciBFJYeG33MpOIrBSNA4T4QjAq34YD3YgwN XKkQDrkVAPESCKIo0qeuLInzc3rWkEyzt34iLReeqy7gEeCv0TeBXXliuvH4yMOowc+YvlhX4sn 3w6UVSR/Mis0GcgQY8n9SIyEkRIkFyWgulCg4FkzB5N4/4uzcNMgIPEG0fqRm7UZDKc/G9+c= X-Received: by 2002:adf:f20e:0:b0:32d:a781:111 with SMTP id p14-20020adff20e000000b0032da7810111mr4872921wro.15.1697644639773; Wed, 18 Oct 2023 08:57:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhF8nQF+ovBq1uagItTQQS/ECiw8zvrwiOCNT68g+hghMkMgwPeoQeBP5lhsAq21OWCNPzWQ== X-Received: by 2002:adf:f20e:0:b0:32d:a781:111 with SMTP id p14-20020adff20e000000b0032da7810111mr4872898wro.15.1697644639374; Wed, 18 Oct 2023 08:57:19 -0700 (PDT) Date: Wed, 18 Oct 2023 11:57:14 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Bernhard Beschow , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PULL 51/83] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device Message-ID: <3cccc57a6adad904fe5e94e05326160965cfc4a6.1697644299.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697645162110100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Thie PIIX3 south bridge implements both the PIC and the ISA bus, so wiring = the interrupts there makes the device model more self-contained. Furthermore, t= his allows the ISA interrupts to be wired to internal child devices in pci_piix3_realize() which will be performed in subsequent patches. Signed-off-by: Bernhard Beschow Message-Id: <20231007123843.127151-10-shentey@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 2 +- hw/isa/piix3.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index cd6c00c0b3..5988656279 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -293,6 +293,7 @@ static void pc_init1(MachineState *machine, } else { isa_bus =3D isa_bus_new(NULL, system_memory, system_io, &error_abort); + isa_bus_register_input_irqs(isa_bus, x86ms->gsi); =20 rtc_state =3D isa_new(TYPE_MC146818_RTC); qdev_prop_set_int32(DEVICE(rtc_state), "base_year", 2000); @@ -301,7 +302,6 @@ static void pc_init1(MachineState *machine, i8257_dma_init(isa_bus, 0); pcms->hpet_enabled =3D false; } - isa_bus_register_input_irqs(isa_bus, x86ms->gsi); =20 if (x86ms->pic =3D=3D ON_OFF_AUTO_ON || x86ms->pic =3D=3D ON_OFF_AUTO_= AUTO) { pc_i8259_create(isa_bus, gsi_state->i8259_irq); diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index 616f5418fa..3e7c42fa68 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -278,6 +278,8 @@ static void pci_piix3_realize(PCIDevice *dev, Error **e= rrp) memory_region_add_subregion_overlap(pci_address_space_io(dev), PIIX_RCR_IOPORT, &d->rcr_mem, 1); =20 + isa_bus_register_input_irqs(isa_bus, d->isa_irqs_in); + i8257_dma_init(isa_bus, 0); =20 /* RTC */ --=20 MST