From patchwork Sun Mar 3 18:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1907307 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=L+G/aUry; 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 4Tnrc76kn6z23l2 for ; Mon, 4 Mar 2024 05:55:03 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgqyG-0002z4-W8; Sun, 03 Mar 2024 13:54:01 -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 1rgqy4-0002xg-IC for qemu-devel@nongnu.org; Sun, 03 Mar 2024 13:53:49 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgqy2-0003xj-Al for qemu-devel@nongnu.org; Sun, 03 Mar 2024 13:53:48 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-412b83cfac4so27157125e9.0 for ; Sun, 03 Mar 2024 10:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709492023; x=1710096823; 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=baHI6m1T65RnSlCWzDcEpxWd9aF6YHbHZbyLFWSGcSE=; b=L+G/aUryPMlmj2f1olTd7EtwUdBjHi4s3tqixKn5xiqXeZXRgK6XgX3KWBajWOIHdw K8mD/XiJdcC/bIgnzVGWcCWwxXt2YFVgoAlYhb7M4D/uAD18JovHMq1qXTr5+ojRWls9 P/UP3tG3s+lDOtvaXfQ6OpZYe4pjT/BW0RMUmmyuxO48vDUty5ZpRliooJng5ZHuMfJd P+FN5Qg/tGoHibkr4Ob7FQnFMCWyU0TAjffgOF3hVGU98xJuxwt8yFfPO7Y9Pw5xFC0R M2C7TbmJ89q+IZj5qN+l3uj2Wv0DwLlZ1An+l2tzYYarspUlEJ8RVW5UXYtdmTAAgtN4 elYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709492023; x=1710096823; 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=baHI6m1T65RnSlCWzDcEpxWd9aF6YHbHZbyLFWSGcSE=; b=D7YAizCB7iIa6lbjEbhGb5Hx8FDRfmXLjLt7F9U69PM8gMS7RY3x6P12teBLvO8qyw j/xaB54I075XGS6gw1OpmBRd3bifhesybVztNLefXWElPFSmF3ht2GqVWeyMeQaPuhpr zN1EU4QYwVs8X27E5TKLm6BMQE+sBgQ8l459SfL0sBDu0EGwJ5i5fFyVv5Pr+gN0U/rc fxMkX4NCyUJKR6QJP3bE+Myhf4Gm7dAXUwJtUULcPU4aQ0dOOkiNU0yKh9Qi7exvg09U +CjBfm6UZQqkqCblFXJKoxM62vPFQEku0zGlPt/PJU6DfcaKb4KtzdDkpC47VGdeiHfb xaqg== X-Gm-Message-State: AOJu0YwLg9OM5GSPbtp0htbbpJvmg4gSU6pAL2kOPOUyWx/UKs4ArBxM YnrzSV+seyPXARqBmVAdALQk7j4MFg4MFmyIq6PD6h9ebwdOmZ2LcvTztZnc X-Google-Smtp-Source: AGHT+IFturk5GX+lhlPN3YepGRWihgPxtRNCAM68IeaNQR1j+vinjP3fwQpALeoFXlwM7gmOw2KNjw== X-Received: by 2002:a05:600c:4fc2:b0:412:dda9:1038 with SMTP id o2-20020a05600c4fc200b00412dda91038mr1433440wmq.4.1709492023212; Sun, 03 Mar 2024 10:53:43 -0800 (PST) Received: from archlinux.. (dynamic-092-224-118-014.92.224.pool.telefonica.de. [92.224.118.14]) by smtp.gmail.com with ESMTPSA id o17-20020a05600c4fd100b00412d68dbf75sm5259460wmq.35.2024.03.03.10.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 10:53:42 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jason Wang , Eduardo Habkost , Marcel Apfelbaum , "Michael S. Tsirkin" , Paolo Bonzini , Sergio Lopez , Paul Durrant , David Woodhouse , Richard Henderson , Igor Mammedov , Ani Sinha , Bernhard Beschow Subject: [PATCH v3 0/4] Simplify initialization of PC machines Date: Sun, 3 Mar 2024 19:53:28 +0100 Message-ID: <20240303185332.1408-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::331; envelope-from=shentey@gmail.com; helo=mail-wm1-x331.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` -> all tests pass * `make check-avocado` * I'm sending this series from within a VM containing these changes. v3: * Rebase onto master * Fix boot-order-test * Remove the "rtc_state" link again which got accidently reintroduced * Add patch avoiding one use of the current_machine global 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 (4): hw/i386/pc: Remove "rtc_state" link again hw/i386/pc: Avoid one use of the current_machine global hw/i386/pc: Set "normal" boot device order in pc_basic_device_init() hw/i386/pc: Inline pc_cmos_init() into pc_cmos_init_late() and remove it include/hw/i386/pc.h | 2 -- hw/i386/pc.c | 29 ++++++----------------------- hw/i386/pc_piix.c | 2 -- hw/i386/pc_q35.c | 2 -- 4 files changed, 6 insertions(+), 29 deletions(-)