From nobody Sun Feb 8 23:50:41 2026 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576674233; cv=none; d=zohomail.com; s=zohoarc; b=jKxRXQ2/5KQF1uhw0IiWX3Z3dADCfV22vhleS/9a6weIdU6G0fhQXoPDQ0ujp3gTm+xramOfw/yj4sMl9JYX55ii51lY53TF3m2EgrrWuPn2h6emghV9B0YzxnkQvMDcZaYFs4SOGE94H2aHXwUDYvOCQCVRZFuWv+J26foFKvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576674233; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9X2hwIcj1HfDRf0oxNBJGWqhVs/TtZghOe20kMkyMnU=; b=TR8g7tjSGzapUZnzOlcaAP/Dxfb6GHpAevE0tPtTzbDg6BxwEWmDqOPxpu1BCPgfU5zP4Wc4Px2Cz61jISQqq0IgsOYlLlT2a5HN+851Z36GSDeQN3V61t4JBpKiodCpoUJX9NQ5ucIufHna/UWTizjJb91Q7AQ0GxyLsHQlXcc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576674233657302.53736624703834; Wed, 18 Dec 2019 05:03:53 -0800 (PST) Received: from localhost ([::1]:53950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihYzX-0004u4-SC for importer@patchew.org; Wed, 18 Dec 2019 08:03:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57817) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihY3z-0007U5-ST for qemu-devel@nongnu.org; Wed, 18 Dec 2019 07:04:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihY3y-0003u3-FP for qemu-devel@nongnu.org; Wed, 18 Dec 2019 07:04:23 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihY3y-0003qW-5T for qemu-devel@nongnu.org; Wed, 18 Dec 2019 07:04:22 -0500 Received: by mail-wr1-x42b.google.com with SMTP id w15so2021378wru.4 for ; Wed, 18 Dec 2019 04:04:22 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id n67sm2236838wmf.46.2019.12.18.04.04.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Dec 2019 04:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9X2hwIcj1HfDRf0oxNBJGWqhVs/TtZghOe20kMkyMnU=; b=Dn7qkoTmDoUzeKuFtsG+cWcMUN6DDzC1jO2ABvt5EOX15rOezvx7A5am6XK+/rUgVl btsUHy5SuPcaKHi2cNitTyNiR65L8sYEzAHA2gNsni6JE0KfzW/Tw8dhSscpkTvtTO2O yOO/YLSj64btK+L7jwkcuMRr+KhJxQxobz86eYlkSFFmKWOGd/bje8lXYt58ZB/H9h+Z bkyUeEHRlvYFV4sNqBxWZIuwjoJFjB0hm4aRNXiQavxe/otwCFF0+UzEsy20l7tf+uEo dQ1yxI7tdarJkNi3L8MMOReMzs1EI5lpid3LhNNGB9f4o7l9pkPDUVyx3L3gwC2jV64O +WiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9X2hwIcj1HfDRf0oxNBJGWqhVs/TtZghOe20kMkyMnU=; b=b0m4ESc6jo9zFI/qWJrjeMQVhfDJkf5HAGGEqgFihBWZiTrwosIzHaNCLdmiIknXMS cmNkx7HufW7nfwTIM/q0EMnpuM2ondjIRNlcDwiKZU4OQ0/vWBmM+cjkwhT+49ChQ+TL GzPgq/hCkDvhHGhlX1eqtg8o/23mSXyuA78ckuLFidukMOkulhijnoGdvUmZ+v44I+5J 13iOuWUia8Q0dY9piwwUYMNWn3d3UCBtP77PjQFX+wNdiyBIXlPqW7vCjHazH2pidU3I RO0uAnQ5k2qdyRzD2n+IrbOMqz0C/teF11v0pZSFRtmykBD6flR4XpzhntDMicDTrMbe Qtyw== X-Gm-Message-State: APjAAAWDdyXFuDlkU1lC+uDRiZjSiPFw2zF8QxC5Vtr+sOtTNtLCK32V TF170bt4xaiPIVSyc+IuPcSPm4Jo X-Google-Smtp-Source: APXvYqxdmywXKDo9QTvLUgq3fSKIBzUWEKXbb2M59mu5EPlveScqCXneyGGp19EPOuuq/3JBzds82A== X-Received: by 2002:adf:e984:: with SMTP id h4mr2385793wrm.275.1576670660909; Wed, 18 Dec 2019 04:04:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 78/87] hw/pci-host/i440fx: Extract PCII440FXState to "hw/pci-host/i440fx.h" Date: Wed, 18 Dec 2019 13:02:44 +0100 Message-Id: <1576670573-48048-79-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576670573-48048-1-git-send-email-pbonzini@redhat.com> References: <1576670573-48048-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Make the PCII440FXState structure public, so it can be used out of this source file. This will allow us to extract the IGD Passthrough Host Bridge, which is a children of the TYPE_I440FX_PCI_DEVICE. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20191209095002.32194-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- hw/pci-host/i440fx.c | 18 ------------------ include/hw/pci-host/i440fx.h | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 3fc9442..fbdc563 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -31,7 +31,6 @@ #include "hw/sysbus.h" #include "qapi/error.h" #include "migration/vmstate.h" -#include "hw/pci-host/pam.h" #include "qapi/visitor.h" #include "qemu/error-report.h" =20 @@ -51,23 +50,6 @@ typedef struct I440FXState { uint32_t short_root_bus; } I440FXState; =20 -#define I440FX_PCI_DEVICE(obj) \ - OBJECT_CHECK(PCII440FXState, (obj), TYPE_I440FX_PCI_DEVICE) - -struct PCII440FXState { - /*< private >*/ - PCIDevice parent_obj; - /*< public >*/ - - MemoryRegion *system_memory; - MemoryRegion *pci_address_space; - MemoryRegion *ram_memory; - PAMMemoryRegion pam_regions[13]; - MemoryRegion smram_region; - MemoryRegion smram, low_smram; -}; - - #define I440FX_PAM 0x59 #define I440FX_PAM_SIZE 7 #define I440FX_SMRAM 0x72 diff --git a/include/hw/pci-host/i440fx.h b/include/hw/pci-host/i440fx.h index f54e646..cc58d82 100644 --- a/include/hw/pci-host/i440fx.h +++ b/include/hw/pci-host/i440fx.h @@ -13,12 +13,27 @@ =20 #include "hw/hw.h" #include "hw/pci/pci_bus.h" - -typedef struct PCII440FXState PCII440FXState; +#include "hw/pci-host/pam.h" =20 #define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost" #define TYPE_I440FX_PCI_DEVICE "i440FX" =20 +#define I440FX_PCI_DEVICE(obj) \ + OBJECT_CHECK(PCII440FXState, (obj), TYPE_I440FX_PCI_DEVICE) + +typedef struct PCII440FXState { + /*< private >*/ + PCIDevice parent_obj; + /*< public >*/ + + MemoryRegion *system_memory; + MemoryRegion *pci_address_space; + MemoryRegion *ram_memory; + PAMMemoryRegion pam_regions[13]; + MemoryRegion smram_region; + MemoryRegion smram, low_smram; +} PCII440FXState; + #define TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE "igd-passthrough-i440FX" =20 PCIBus *i440fx_init(const char *host_type, const char *pci_type, --=20 1.8.3.1