From patchwork Tue Feb 14 13:14:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1742341 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=nbQadeXI; 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 4PGMDl3WDtz23r4 for ; Wed, 15 Feb 2023 00:16:55 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRv9Z-0007XK-AV; Tue, 14 Feb 2023 08:15:26 -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 1pRv9O-0007TK-2B for qemu-devel@nongnu.org; Tue, 14 Feb 2023 08:15:15 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRv9K-0003td-VB for qemu-devel@nongnu.org; Tue, 14 Feb 2023 08:15:12 -0500 Received: by mail-ej1-x634.google.com with SMTP id sa10so39880900ejc.9 for ; Tue, 14 Feb 2023 05:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hCDiOMwbwH+OVe131j6/laXnhN6tskF0qfeJGurFHxo=; b=nbQadeXIkcGwp+ziSx3bcp34rZ0bYQMZB8vWyUrQtBTrEWM1OxseSTvLe89DbyeSs/ iLMBe2qVTCtKFG94v+h9pTjGthyAsradjd8P8a6rbDq62mBhFA/keTliV46lhaacrr/Z iBTkHGSJWBp1hoSXUi4YK3Oxufu5LqFXRwn9Dqer8JTAhWDkd/YjxO0OIlI7doKIovWP FjvHR3gDuOt29FdJ36bof1vZq83CE1urv/+7QhjiQznvaropVWp6rScQy8meg0JcKpri JVCzMKqOXBRt8yxCyyetpeKTFielYvpSp2yGfN/0lZbWmtMg/Wf1hThiu1DWAS0YgkaI FX3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hCDiOMwbwH+OVe131j6/laXnhN6tskF0qfeJGurFHxo=; b=VfH4uC3S8rtS3vNvfwMy9v5AQnmW2aKDagNuvlghcqhdThd0DVTsJqLduGTFLIhSY7 SNPZyl48gFEVSrkdGog7cQctrCtYxh1FXFRXv1Q1r7tF09naMkSawulAV2aKHoqvDeTt zbLjMoFQh5y1WU1pBQGoGgcxAAo1/K4apgYRhmc9ULseFvQlclQHuLlLPVe8UHjJukhm v7rfJ4xKT+aT/r/GzkidDk5vq7ExnB2iP7AXHT0sFDbOgnuaozTdjWCKrrIRqY9/hZnq M4doMN6K+R/6neky7muR6fTeCXGeOzfcDmYWryRni07WWwZNxdU4Th62QJ8gxPf2X76j +MKw== X-Gm-Message-State: AO0yUKUkVnmWXtGab3lY59jZk4kDzkXirkyhguQut08H50dqZxeqAxWm OzS1cYkHiQgfwkKJ0WpSQCYzEXD046M= X-Google-Smtp-Source: AK7set9l3gwCTATVRivUB52DOGBJYIqOF/gvrupBhn89wTdA282OcigcL69v43gVS/G4r2oFouYAGw== X-Received: by 2002:a17:906:b88c:b0:88e:682e:3a9e with SMTP id hb12-20020a170906b88c00b0088e682e3a9emr2619048ejb.61.1676380509159; Tue, 14 Feb 2023 05:15:09 -0800 (PST) Received: from localhost.localdomain (dynamic-092-224-101-237.92.224.pool.telefonica.de. [92.224.101.237]) by smtp.gmail.com with ESMTPSA id hz17-20020a1709072cf100b008b13836801bsm220153ejc.183.2023.02.14.05.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 05:15:08 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Eduardo Habkost , Bernhard Beschow Subject: [PATCH 00/12] Q35 PCI host fixes and QOM cleanup Date: Tue, 14 Feb 2023 14:14:29 +0100 Message-Id: <20230214131441.101760-1-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=shentey@gmail.com; helo=mail-ej1-x634.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 series mostly cleans up QOM-related initialization code. It also performs some modernization and fixing. The first patch originates from "PC and ICH9 clanups" series [1] which has been dropped in v3 in favor of another series [2]. Review comments in [2] suggest it needs more work, so bring the patch back here. Patch 2 fixes a clangd warning and patch 3 modernizes usage of the memory API. Patches 4-9 clean up initialization code. The last four patches also clean up initialization code with the last patch doing the actual cleanup. Based-on: <20230213162004.2797-1-shentey@gmail.com> "[PATCH v4 0/9] PC cleanups" Testing done: * `make check` * `make check-avocado` * `qemu-system-x86_64 -M q35 -m 2G -cdrom \ manjaro-kde-21.3.2-220704-linux515.iso` [1] https://lore.kernel.org/qemu-devel/20230131115326.12454-1-shentey@gmail.com/ [2] https://lore.kernel.org/qemu-devel/20230203180914.49112-1-philmd@linaro.org/ Bernhard Beschow (12): hw/i386/pc_q35: Resolve redundant q35_host variable hw/pci-host/q35: Fix contradicting .endianness assignment hw/pci-host/q35: Use memory_region_set_address() also for tseg_blackhole hw/pci-host/q35: Initialize PCMachineState::bus in board code hw/pci-host/q35: Initialize "bypass-iommu" property from board code hw/pci-host/q35: Initialize properties just once hw/pci-host/q35: Initialize PCI hole boundaries just once hw/pci-host/q35: Turn PCI hole properties into class properties hw/pci-host/q35: Rename local variable to more idiomatic "phb" hw/pci-host/q35: Propagate to errp rather than doing error_fatal hw/pci-host/q35: Merge mch_realize() into q35_host_realize() hw/pci-host/q35: Move MemoryRegion pointers to host device include/hw/pci-host/q35.h | 17 +- hw/i386/pc_q35.c | 33 ++-- hw/pci-host/q35.c | 325 ++++++++++++++++++-------------------- 3 files changed, 178 insertions(+), 197 deletions(-)