From patchwork Thu Sep 1 16:25:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 12962905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBF52C64991 for ; Thu, 1 Sep 2022 16:29:49 +0000 (UTC) Received: from localhost ([::1]:54706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTn4e-0004Yf-OZ for qemu-devel@archiver.kernel.org; Thu, 01 Sep 2022 12:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTn1r-0001c5-O3 for qemu-devel@nongnu.org; Thu, 01 Sep 2022 12:26:56 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:41596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTn1p-0001TN-PA for qemu-devel@nongnu.org; Thu, 01 Sep 2022 12:26:55 -0400 Received: by mail-ej1-x633.google.com with SMTP id se27so28081672ejb.8 for ; Thu, 01 Sep 2022 09:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=8WFpCGhPddaEE2JHOfiKT0by33talYfLnci1riHKxms=; b=XCcal4foQNQY901vr9r/wEAJLIBsIuTQqHz9O2odYcaV1GRw/2lGwCLAjryLkoAvCI QuqDJQUQooHhqygvGXgXyRvxhqKJbh6fBuC6tyGaildD1nPfa5UlTIhK+PBwBUZkfvxT v10/lxfeKhimGf6vZ9lwZPQR4Y2SjmTI6k0DoZdpn9GW/KSNmLwEOsczAZueK29BX0lY gLntskoDwXkXuaXjgKH4qPYeq3CtcO7cKUqQWsh2J8UxZ01tNzG3pkugDoED7ycaVo81 uY5KKu+NMQ1bJesB3rWaNfIQPdcg8u9tZZI0viJBjmDlmJv1QrKtpuMmkAmLvC8RMTf5 zvIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=8WFpCGhPddaEE2JHOfiKT0by33talYfLnci1riHKxms=; b=Eek7iTSgLcTLtgf+KigSskbBunLvGyFhxgHa28JpMgPmrF43CEoPOBO4PzevAf2VMT 2uK83HaJQxfx4gAPTOThvDM+rcEgdxAtKlv/g5MXOAszSWefuvIQ5JCYinXvlBoMJBNK VCN0neBAFHmDM2AwbPVeLNfj47SNE9GG3SzgdV2IlMVgMDF6/2S6xyD4alXcRguU+9rY 4kItOV87i4UPeJBNOcVpvt/rZp/DJmiaVS+56xp5I0Zeeys7mnlHgRXUQm9mKqyIpeNb UEDaL4OQWTl4MB1WMH+WnZ5LY5B1y/DORDPdCUoIRznBSpyBTCiT5985heLK3/RGSrJJ cIeg== X-Gm-Message-State: ACgBeo2nWAy7XsPn0cetZ0+xi8UA2DVrcz+yHhf3Qs3xqwVYfoBxph0v f/EpSpz+Rpb5yGtsHgKb/STIRz93+v0= X-Google-Smtp-Source: AA6agR7uZTEuCS+6p/4wafCjS95fz7fIVWcT3tJCwf9G5wxtBKStL+d3TA9KE/FZGLWMNmp08pzSCQ== X-Received: by 2002:a17:906:6a21:b0:741:430f:baca with SMTP id qw33-20020a1709066a2100b00741430fbacamr18933507ejc.507.1662049611017; Thu, 01 Sep 2022 09:26:51 -0700 (PDT) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id p6-20020aa7d306000000b00447c0dcbb99sm1587672edq.83.2022.09.01.09.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 09:26:50 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Her?= =?utf-8?q?v=C3=A9_Poussineau?= , Aurelien Jarno , Paolo Bonzini , Eduardo Habkost , Richard Henderson , Jiaxun Yang , Ani Sinha , Igor Mammedov , Marcel Apfelbaum , "Michael S. Tsirkin" , Bernhard Beschow , Peter Maydell Subject: [PATCH 04/42] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge Date: Thu, 1 Sep 2022 18:25:35 +0200 Message-Id: <20220901162613.6939-5-shentey@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220901162613.6939-1-shentey@gmail.com> References: <20220901162613.6939-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=shentey@gmail.com; helo=mail-ej1-x633.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, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The next patches will need to take advantage of it. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell --- hw/i386/pc_piix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bdad3b6795..b08d946992 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -218,7 +218,8 @@ static void pc_init1(MachineState *machine, pci_memory, ram_memory); pcms->bus = pci_bus; - pci_dev = pci_create_simple_multifunction(pci_bus, -1, true, type); + pci_dev = pci_new_multifunction(-1, true, type); + pci_realize_and_unref(pci_dev, pci_bus, &error_fatal); piix3 = PIIX3_PCI_DEVICE(pci_dev); piix3->pic = x86ms->gsi; piix3_devfn = piix3->dev.devfn;