From nobody Mon Jul 7 04:29:17 2025 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1677943670; cv=none; d=zohomail.com; s=zohoarc; b=BW2Ti9uss0qkxkd9meWcEsSch++iSVjrMF2yvzPgQmOfEgPjyHHV87P7Y0d1k5zuFFOAQSjpAeVK5pDCqFVeo4DHQA25D+V+V2Sa9HOS6xJqx1d5jq2QgHmuJ3S47L2NFAiXtUEu0I1avuZ5EwiakpnbLEVUaA0ortXejh51QyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677943670; h=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=v2uxuGNb6ksFRC5cQ94kDdGIszx60jdE3syJ7+PyW08=; b=N8hayPhbg2b9RPmnSbfNM3oZVusiNFfhPbc7sMthGHA2cXw+NvCDcB2AqFZrtz0yigmfnmiNLIDjVa2VJrSH/naor239HbHHFbMfsZ7sv9cSD0m+5wfzNxE9+DX73AFaOPRvPOk7r/3v53anTit+x0z2gU3Dkqs57lRhBfJqS1A= 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+importer2=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 1677943670933664.1290394502352; Sat, 4 Mar 2023 07:27:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYTmz-0003R2-F2; Sat, 04 Mar 2023 10:27:13 -0500 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 1pYTmy-0003Qk-6T for qemu-devel@nongnu.org; Sat, 04 Mar 2023 10:27:12 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYTmt-0008AU-3c for qemu-devel@nongnu.org; Sat, 04 Mar 2023 10:27:11 -0500 Received: by mail-ed1-x529.google.com with SMTP id s11so21587489edy.8 for ; Sat, 04 Mar 2023 07:27:06 -0800 (PST) Received: from Provence.localdomain (dynamic-077-183-004-175.77.183.pool.telefonica.de. [77.183.4.175]) by smtp.gmail.com with ESMTPSA id h7-20020a170906398700b008dd6bf721c2sm2170540eje.106.2023.03.04.07.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Mar 2023 07:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677943625; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v2uxuGNb6ksFRC5cQ94kDdGIszx60jdE3syJ7+PyW08=; b=F1n4u/rqptZMue1/n9z6l4XuaKGGlUxAYUPl8ZXIvNIo1rECTx1fwSeiDFCW40k0qJ 0zAR48gD1vdUdQ5J8FkxE4OHOtK0y/4pv64oCkIPQKm2jYn7ztLhBucbq7xABWSFDshA 5/zBVWrqANkGKKpFIF9GRaRxE6rHL2HXPe4nArMS9OiQ2BD56RXRrnL1oCwsRJr5MsR6 X5pzBELO5sZAJpHkYOLkKjz5il3WqMij7PkiXiLh4i6VNMseY9riuXgFYNCi7UhL2xtV 9raojLZrpUBe1YBhy+8+YvLGVzqGvLxG3SBYD9RYYtV5wNzlJYeUgKImvAZZywmMbTew UK7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677943625; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2uxuGNb6ksFRC5cQ94kDdGIszx60jdE3syJ7+PyW08=; b=00MGLqEQgyA9V8NLt0nWgqfNyBSr2dy5lZ41R7NoeGMO3JXnGr16LW5my5C9mKOAQM gBQY7F64fNNUuKe+uQpwbH7wF0sVVCQGNK6ywyPEKa8Q1QrVW1Zned8O9asLrcZd6vOr m5cmqnux/kfsolTEZMwKc1K4wbxAis3lfWtBtETcqRAVNYYCpEUsytUUbiu41BXJAheq KlqKr1UDBzSjWxfUuaUrotXBWeX6TONQ9TRcCk/AH2ibhKHlQZYT2gaVDQMxonxz7e2T plNS/B0TSrxCJa/PIahKkJmofIX1TmeOKyoHpnJbSe5SyAe2vS7TlA/9qwE8BYgaBCKy h/vQ== X-Gm-Message-State: AO0yUKU2N+Pc2BGACcA4ajscecx0gsLPvv1ZEJf28d46/2UnOYO4uvSF 1GdJsBYjD3SuB0gX/XBdSjgygt17yUo= X-Google-Smtp-Source: AK7set+ehTtQmbicv2ozpO9NFAVmYRLkOvUFd4OXZMXO4qr2sME19elUprZS4SkNqWixCZpq2pM8kA== X-Received: by 2002:aa7:cfc8:0:b0:4b6:821e:1859 with SMTP id r8-20020aa7cfc8000000b004b6821e1859mr9201026edy.7.1677943625258; Sat, 04 Mar 2023 07:27:05 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Paolo Bonzini , Richard Henderson , Marcel Apfelbaum , Bernhard Beschow Subject: [PATCH v2 09/13] hw/pci-host/q35: Turn PCI hole properties into class properties Date: Sat, 4 Mar 2023 16:26:44 +0100 Message-Id: <20230304152648.103749-10-shentey@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230304152648.103749-1-shentey@gmail.com> References: <20230304152648.103749-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=shentey@gmail.com; helo=mail-ed1-x529.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1677943671848100001 Content-Type: text/plain; charset="utf-8" These properties are class properties in i440fx. No need to handle them differently in q35. Signed-off-by: Bernhard Beschow --- hw/pci-host/q35.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 23df52a256..afd192cc2a 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -207,6 +207,22 @@ static void q35_host_class_init(ObjectClass *klass, vo= id *data) dc->user_creatable =3D false; set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->fw_name =3D "pci"; + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_START, "uint32= ", + q35_host_get_pci_hole_start, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_END, "uint32", + q35_host_get_pci_hole_end, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_START, "uint= 64", + q35_host_get_pci_hole64_start, + NULL, NULL, NULL); + + object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_END, "uint64= ", + q35_host_get_pci_hole64_end, + NULL, NULL, NULL); } =20 static void q35_host_initfn(Object *obj) @@ -224,22 +240,6 @@ static void q35_host_initfn(Object *obj) qdev_prop_set_int32(DEVICE(&s->mch), "addr", PCI_DEVFN(0, 0)); qdev_prop_set_bit(DEVICE(&s->mch), "multifunction", false); =20 - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", - q35_host_get_pci_hole_start, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_END, "uint32", - q35_host_get_pci_hole_end, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_START, "uint64", - q35_host_get_pci_hole64_start, - NULL, NULL, NULL); - - object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_END, "uint64", - q35_host_get_pci_hole64_end, - NULL, NULL, NULL); - object_property_add_uint64_ptr(obj, PCIE_HOST_MCFG_SIZE, &pehb->size, OBJ_PROP_FLAG_READ); =20 --=20 2.39.2