From patchwork Tue Jan 31 11:53:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1734802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=JfMc61Ot; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P5k5p08phz23gY for ; Tue, 31 Jan 2023 22:55:58 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMpDG-0006pe-O6; Tue, 31 Jan 2023 06:54:10 -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 1pMpDD-0006mY-Rs; Tue, 31 Jan 2023 06:54:07 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMpDC-0002Kz-Bx; Tue, 31 Jan 2023 06:54:07 -0500 Received: by mail-ed1-x534.google.com with SMTP id n6so11500911edo.9; Tue, 31 Jan 2023 03:54:05 -0800 (PST) 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:subject:date :message-id:reply-to; bh=0YKkwhxcXAzM3VHw9UsOTvoyMrRmWQaCXcSphc2uXOc=; b=JfMc61Ot7pgGVPGxXCwypHN2xdS0YDwL5gYEU7PX0it5yE8dXarmZlLXOB0iGhvGFQ 9MEG15VuzgJZgS+h56CsOpaDXGvHH9qnmBBdmyL+xzSvxJ2WmQoqSslckr4G6MOsXZak R1OdMKHZCnYHl9LxRUpwiLziU239X27Yl82wLdIgl4nlvEXuHCp1GwYcZWDTd1epuUTG nAnlHi9puGidpHBKcxAXerGaMZLDNohss0IHWdffu9cbAtaUEMsLjn3sIcjgxt2GpEKB IU6/scuLKL9Le5CE8keKuxKRLFa5BIvYM5LjZ2mgkyKh+vQIzdLfApEpczyolekY4GnI aS8A== 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 :subject:date:message-id:reply-to; bh=0YKkwhxcXAzM3VHw9UsOTvoyMrRmWQaCXcSphc2uXOc=; b=dyQFqvcTCO7oTzf9uyeT9zEG4nqxuZs6XO5odIu1raXMQMufr1i9g5wLAGZZCLeNVE 7sCy5m7Uj8iusJVu4Vdk9KOKX/+guQmOU6k6tc5GM0P4gxf2oPo6+e064nldBNqTI4Fu /1VOYNr9MSCve/TbXAF9XDTTcyJZXvci6wVprRWJXc+MxwrDepAiyvXZIBkuF2EBqmu/ 9JGF0a92yiqutr4PzCP0+UCTleMcj+YFXbgBABcJKq23qVWl43ZUNpGzH/eHPgE74+NY AlEZVn7cfJyZpwz9M7VCEz8nXjULtpJ7xmyCsTcXkD/gkvAmaYnUU/MmD9aQKWLYiiIs Rh3w== X-Gm-Message-State: AO0yUKUGhlMRJpzqTB3csNdCddbywBRCEQm9vxByaqpo5oY4crgmTHYZ iYSm+83dA2nyutNbvTBSw4PQyxBii8U= X-Google-Smtp-Source: AK7set9muMtpTnzBDHuOvCXoLUGdcqrP+R996N5ewrJC3o6IheaGnhme3ddBFRAdgloFw5967m0lHw== X-Received: by 2002:aa7:d295:0:b0:4a2:4074:7d81 with SMTP id w21-20020aa7d295000000b004a240747d81mr8561397edq.16.1675166045124; Tue, 31 Jan 2023 03:54:05 -0800 (PST) Received: from localhost.localdomain (dynamic-077-013-082-236.77.13.pool.telefonica.de. [77.13.82.236]) by smtp.gmail.com with ESMTPSA id c10-20020a056402100a00b00483dd234ac6sm8178318edu.96.2023.01.31.03.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 03:54:04 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Igor Mammedov , Richard Henderson , Ani Sinha , "Michael S. Tsirkin" , Paolo Bonzini , BALATON Zoltan , Thomas Huth , Marcel Apfelbaum , Eduardo Habkost , Laurent Vivier , Sunil Muthuswamy , qemu-trivial@nongnu.org, Bernhard Beschow Subject: [PATCH v2 14/20] hw/i386/pc_q35: Allow for setting properties before realizing TYPE_ICH9_LPC_DEVICE Date: Tue, 31 Jan 2023 12:53:20 +0100 Message-Id: <20230131115326.12454-15-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230131115326.12454-1-shentey@gmail.com> References: <20230131115326.12454-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=shentey@gmail.com; helo=mail-ed1-x534.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is a preparation to make the next patch cleaner. Signed-off-by: Bernhard Beschow --- hw/i386/pc_q35.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index fab8e57913..27a1fe351d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -232,10 +232,11 @@ static void pc_q35_init(MachineState *machine) /* pci */ sysbus_realize_and_unref(SYS_BUS_DEVICE(phb), &error_fatal); host_bus = PCI_BUS(qdev_get_child_bus(DEVICE(phb), "pcie.0")); + /* create ISA bus */ - lpc = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_LPC_DEV, - ICH9_LPC_FUNC), true, - TYPE_ICH9_LPC_DEVICE); + lpc = pci_new_multifunction(PCI_DEVFN(ICH9_LPC_DEV, ICH9_LPC_FUNC), true, + TYPE_ICH9_LPC_DEVICE); + pci_realize_and_unref(lpc, host_bus, &error_fatal); object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP, TYPE_HOTPLUG_HANDLER,