From patchwork Sat Feb 24 13:58:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1903843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=20230601 header.b=K6lA0bNl; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 4ThpT60Jfqz23q3 for ; Sun, 25 Feb 2024 01:01:30 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdsYb-00049h-9n; Sat, 24 Feb 2024 08:59: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 1rdsYV-000488-M9 for qemu-devel@nongnu.org; Sat, 24 Feb 2024 08:59:07 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdsYT-0002ji-5Q for qemu-devel@nongnu.org; Sat, 24 Feb 2024 08:59:07 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4129e8bc6c8so2234575e9.2 for ; Sat, 24 Feb 2024 05:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708783141; x=1709387941; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=x1ZhPUucBt8tj+BiCJh7QcDke4xVu6ZuPC0kVaaXLwQ=; b=K6lA0bNlHu4LFghlu27hTTAormIJKJMt5Ab0b0q/N+ka7+XJc6ESt7B6m4K6Cwa82J OUEWMPtDfc7nSoAfA1Ol+s4PVhJ+R9cRebBDc7PWLWTTEjwrscs0FNBqicCJCdFqPXq0 JRTjtF+QLZ/B3FJ7XuKBvEOtUDk2ihB1wohtonE9nfmeRlNE9+UrWlTaFrI53cK4Rb8d lFg4iqltwz8r+bE0wjjObDvsY4+e5gXEnHO/SC534rQMQ/w0RDFmdROcm0WK/mk1+tP0 cOJInWlGvXM4cV1m1njGfa0fN0ds5d6WyOcoSHaML000ZlXDmAWZ/6q7gEC7rpf8h2I/ Qqfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708783141; x=1709387941; 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=x1ZhPUucBt8tj+BiCJh7QcDke4xVu6ZuPC0kVaaXLwQ=; b=X9PkzAb/gjcQvBuT6Onvx7sSPdUs7/Z1AshTrWkcFyMi520jxm5OA3phC1lEhk3FmG nywGaULKuLQuz0fN/YVYSAe/xm3yiUmr/AOf8L+OQXcROawARScmJMuC9ZBwqGeClrvI lsDfBoW/xHPOaXgVQSZpJLIDNJwxfUXtprv2rqFQjyY1F0h5LWFpDG34YhKB31AHi6vP y+wNSPM63doqSb/jUr0psurgxZOmxWWmfeF72a+EkBgET7/nkKULQvQF5FIVDUEeoSxP XDE62N4ROJFG3DqJr9ca1gvbxiOAdiRhcNxb7GiPhP2b1zI24aSDVNVdWpob8hYqDKGs 36KQ== X-Gm-Message-State: AOJu0Yzpzvndr5P1rwWo2flqFcFw3JgbTPAwAst3P3BSTZcWVHb4QVDE YXvBt0/K8jizPyYQfCXDW4G3UebT8uStUtZvNfHq+Pm6kk1oCosl3Nbf/XXU X-Google-Smtp-Source: AGHT+IHEmhFSOhZGIrJNhqRwkUOVhcCTOBgw4zIQ6P85IZ4VX+rZysi9QaV5qbFEdfA/8ADsfFrYhg== X-Received: by 2002:adf:f884:0:b0:33d:bb3f:e2b5 with SMTP id u4-20020adff884000000b0033dbb3fe2b5mr1002323wrp.40.1708783140857; Sat, 24 Feb 2024 05:59:00 -0800 (PST) Received: from archlinux.. (dynamic-089-012-138-060.89.12.pool.telefonica.de. [89.12.138.60]) by smtp.gmail.com with ESMTPSA id n8-20020a056000170800b0033d817eddd3sm2285542wrc.13.2024.02.24.05.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 05:59:00 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Ani Sinha , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Paolo Bonzini , Paul Durrant , Igor Mammedov , Jason Wang , David Woodhouse , Sergio Lopez , Bernhard Beschow Subject: [PATCH v2 0/6] Simplify initialization of PC machines Date: Sat, 24 Feb 2024 14:58:45 +0100 Message-ID: <20240224135851.100361-1-shentey@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=shentey@gmail.com; helo=mail-wm1-x32e.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The series aims to simplify the initialization process of all PC-based machines by streamlining redundant code. Since I haven't seen patches on the list so far for folding CMOS data generation into pc.c, which frees all PC machines from performing this duty explicitly, I've appended this cleanup as the last two patches. Testing done: * `make check` * `make check-avocado` * I'm sending this series from within a VM containing these changes. v2: * Rebase onto master, leaving only patches 1, 3, and 5 * Patch 2: Rename "bus" attribute to "pcibus" (Phil) * Patch 4: Spotted while rebasing * Patch 6: New patch possible after [1] Best regards, Bernhard [1] https://patchew.org/QEMU/20240221211626.48190-1-philmd@linaro.org/20240221211626 .48190-10-philmd@linaro.org/ Bernhard Beschow (6): hw/i386/x86: Let ioapic_init_gsi() take parent as pointer hw/i386/pc: Rename "bus" attribute to "pcibus" hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables hw/i386/pc: Remove unneeded class attribute "kvmclock_enabled" hw/i386/pc: Populate RTC attribute directly hw/i386/pc: Inline pc_cmos_init() into pc_cmos_init_late() and remove it include/hw/i386/pc.h | 5 +---- include/hw/i386/x86.h | 2 +- hw/i386/acpi-build.c | 2 +- hw/i386/amd_iommu.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/xen_evtchn.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc.c | 27 ++++---------------------- hw/i386/pc_piix.c | 42 +++++++++++++++++----------------------- hw/i386/pc_q35.c | 25 ++++++++++-------------- hw/i386/x86-iommu.c | 2 +- hw/i386/x86.c | 7 +++---- 12 files changed, 43 insertions(+), 77 deletions(-)