From patchwork Tue Apr 16 13:52:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789208 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296317wrb; Tue, 16 Apr 2024 06:53:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGD/zNkewNyQZ9drUaPXO9mWgD4yPxr6Bon6xyTjRZKw8Dm6TBuNLBGgqPp6HfQ1686+Pu1MGSNx1W6kgJdKHX X-Google-Smtp-Source: AGHT+IGbOLT9g6vdSrOjjipiTzK49XH8pQBOMd+UQhIozgdRnAn+NgOZiIAQfQNxObehYGLqo8OW X-Received: by 2002:ae9:f40a:0:b0:78d:5c65:dc69 with SMTP id y10-20020ae9f40a000000b0078d5c65dc69mr13848424qkl.33.1713275631492; Tue, 16 Apr 2024 06:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275631; cv=none; d=google.com; s=arc-20160816; b=VvvCuYQFNen4wFPWJNFp4Q4eQUge6C9SgS4+aoj56HA8V2egHa7laz37/3G/Sxfrsp lNMFsIGermzOGLMDiuLNIaK4LhzteBA+MOckh6+iV3ElH6hFrCqhJnLQBtKmlzBT1CO1 iW4DJsJZUBP1Ofp6bceVnQhl1Whq4dw3XtCqw4Xlh34OIetGxLM1LZWfZA4gjZGPo1cN f3keMNkGUhxtDZcEQ4AvTv/+KlhdWY1h0MrVJgDGNGf/LGS3jN8LJZJK2d9iersehIII iAOR15209PIQWS0mwSA6epHu/Rf+2uIKxLGvt85X4LnR/mPvXpTkT55ZeqR47/jVDIrA 3kJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+LpbxsxzvCGJ1fC5t0rkpqq0GOgUXCM3VX0PEDl04Ig=; fh=5OCUA+doqgtSVf9yWNZ10wRW83EIHMMcZo9SVcrtVkA=; b=XfNkme/Og9o3tJSp0QO4I239eKlz/MeYcKXAPJy4WuMqCbIcEH0HtEeHzCrNPFI3Df V8tWn+brxfHKWZx5fhwZZmCS941h4YfSVDczcLjGRUEj0w40w+IMppbseIFswaFytzBB kzpVKhpJz87TovVxOX8uSr2QdJr7f8iongRaLYa2ZUheiQFjBL286CqxM49N9QW5I205 ArIk9A1t7QQzEP4G2G3GIWFR/l/dCTN5bsybaN8mwiCZ3YI+JeSdeKo7JJPRiSg5/GmU 6mxapNvDyaHh56vKvy7+nZr1wKSNQdxqxDCqEoLCmBWJW7E79+5XBZasr83NjfbRkqm8 kW3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cE5WkVd9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bk37-20020a05620a1a2500b0078d6349929dsi14477153qkb.458.2024.04.16.06.53.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:53:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cE5WkVd9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjFS-0001n7-HO; Tue, 16 Apr 2024 09:53:22 -0400 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 1rwjFN-0001hB-Ut for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:18 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFL-0001W8-BS for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:17 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-418a2de4d8fso1970615e9.2 for ; Tue, 16 Apr 2024 06:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275588; x=1713880388; darn=nongnu.org; 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=+LpbxsxzvCGJ1fC5t0rkpqq0GOgUXCM3VX0PEDl04Ig=; b=cE5WkVd9mIxfoQ+mQKj1E+txmzTccUf7e5zRqi0TSnGArUu1KJJEkP/5FnQ4CxnH3i V3og9YNWJdzrjyk/JNaIBMVUkeKq/LCZCl11oXV5niR7ttWNtnodzeU7u3aLAwmnwuaK sZTk6YqBmvH380BFKMGxd7Z0+P4MD29SbfO8XRE0X2LVg84jGRs/XcZ+e2qbz5wT4U+a OWqfNqY9BTI8UuPzKUzAa6nxHs+mwHeTO2zQcTZFbb0vXkQ1AQWL9kr5MqibqnjQCGQ6 943NFEuf1o2IybmP+2V2nFBsHCwR9N8o1G8DcHodsDeWBVGMpIC5AJO7EHbpShuCYXe7 A6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275588; x=1713880388; 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=+LpbxsxzvCGJ1fC5t0rkpqq0GOgUXCM3VX0PEDl04Ig=; b=fnYTupdNcGX5ZGf+8ESTjL3l92MPXCQ8faapMa537LoXRgIrubvpCgP9dnjlHEKv/S UH0R8QY2y68L7xDiIRs+JcDZQWuOI4HVdcL34udWI7TmypfStSN5IKs5qB17ELep/jrQ H89oxhcpnQ3kzgKSBdOXfs062Nc8/3LNUU/BJSvpRU5/lUVCFrS5GLNVMJAx7/ppZ1IA /wycNV2IDVpzmv4Pgotbqr5/IyDDrd+clbcShqJZTv8PJkB0a5iyIkFio1n96oItxkG8 7Ho5oSNqeRcvSrwksv1DI6T2upkF1lVWaffiAXqgMWn9mDbilIndG9wYPO1JK40LkhM3 SvBw== X-Gm-Message-State: AOJu0YxThvsIM3AM+MCAnKEC0Up33y19cGGOzaPZceGXl0Ap+0vNEjSI BTs6xMYI1izd3Je3/lbQcETow20wl+isKb0r7Kc0KNUjNrpBPoTwsDlD0VEfKEBoDDiWFgJCPeE j X-Received: by 2002:a05:600c:154e:b0:418:32f7:e87 with SMTP id f14-20020a05600c154e00b0041832f70e87mr5267871wmg.32.1713275588058; Tue, 16 Apr 2024 06:53:08 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id bg25-20020a05600c3c9900b004162d06768bsm23584799wmb.21.2024.04.16.06.53.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v3 02/22] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Date: Tue, 16 Apr 2024 15:52:31 +0200 Message-ID: <20240416135252.8384-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The pc-i440fx-2.0 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-2-philmd@linaro.org> Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 15 ------------- hw/i386/pc_piix.c | 37 --------------------------------- 5 files changed, 2 insertions(+), 57 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 967ee34267..ef4ad16d41 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,7 +219,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) +``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index f9cf874f7b..51119e623f 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2) +``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 27a68071d7..67856f54c3 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -285,9 +285,6 @@ extern const size_t pc_compat_2_2_len; extern GlobalProperty pc_compat_2_1[]; extern const size_t pc_compat_2_1_len; -extern GlobalProperty pc_compat_2_0[]; -extern const size_t pc_compat_2_0_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5c21b0c4db..172814f604 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -311,21 +311,6 @@ GlobalProperty pc_compat_2_1[] = { }; const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); -GlobalProperty pc_compat_2_0[] = { - PC_CPU_MODEL_IDS("2.0.0") - { "virtio-scsi-pci", "any_layout", "off" }, - { "PIIX4_PM", "memory-hotplug-support", "off" }, - { "apic", "version", "0x11" }, - { "nec-usb-xhci", "superspeed-ports-first", "off" }, - { "nec-usb-xhci", "force-pcie-endcap", "on" }, - { "pci-serial", "prog_if", "0" }, - { "pci-serial-2x", "prog_if", "0" }, - { "pci-serial-4x", "prog_if", "0" }, - { "virtio-net-pci", "guest_announce", "off" }, - { "ICH9-LPC", "memory-hotplug-support", "off" }, -}; -const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ec9c299b06..80488a4756 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine) x86_cpu_change_kvm_default("svm", NULL); } -static void pc_compat_2_0_fn(MachineState *machine) -{ - pc_compat_2_1_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -872,38 +867,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, pc_i440fx_2_1_machine_options); -static void pc_i440fx_2_0_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_1_machine_options(m); - m->hw_version = "2.0.0"; - compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len); - pcmc->smbios_legacy_mode = true; - pcmc->has_reserved_memory = false; - /* This value depends on the actual DSDT and SSDT compiled into - * the source QEMU; unfortunately it depends on the binary and - * not on the machine type, so we cannot make pc-i440fx-1.7 work on - * both QEMU 1.7 and QEMU 2.0. - * - * Large variations cause migration to fail for more than one - * consecutive value of the "-smp" maxcpus option. - * - * For small variations of the kind caused by different iasl versions, - * the 4k rounding usually leaves slack. However, there could be still - * one or two values that break. For QEMU 1.7 and QEMU 2.0 the - * slack is only ~10 bytes before one "-smp maxcpus" value breaks! - * - * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on - * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418. - */ - pcmc->legacy_acpi_table_size = 6652; - pcmc->acpi_data_size = 0x10000; -} - -DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn, - pc_i440fx_2_0_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Apr 16 13:52:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789210 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296416wrb; Tue, 16 Apr 2024 06:54:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXO1yyN0yfx/S2SEwbnxY8lvECp/wvIFgVWk3wM88cO4L6vYxP9g8WcRoTVeU3Q9Klq2M4Jq4MiPTZNIA+795M2 X-Google-Smtp-Source: AGHT+IGEJZ6+dHma/OuVknWNpbBsp7vYF8plYH5zzaHkjE/tcJ0PJ1xyYrL4Lo+smwLaByNwpHB3 X-Received: by 2002:a05:620a:944:b0:78d:6b64:b8df with SMTP id w4-20020a05620a094400b0078d6b64b8dfmr14080465qkw.66.1713275645145; Tue, 16 Apr 2024 06:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275645; cv=none; d=google.com; s=arc-20160816; b=MV5Vn95YjTnIur/St+k+F+FcIBsvZQTVbmdu9aHMTuTu98NBNsFtnXCZUvMtGwagEk AtVE/w/cjcOT7Y1nDMYScmuiJAagZZ+aE2IPQxcEttQCDd6EYK+NPzPxB2kpDIsmWaQE Gv7SSD9UGZkZRV4fugQjdLw7Mk3SK2biu1aoDW55yIPDfBogIRwLS390PV+2PZIIkltV LjHjXfDGdZs5n+JAwegZCyby2r8mPsAujJ72zvzOZUHqb2FcvNMSZW9s3DpPCL6YpeHC fZVA5pQ8GXXSvhWyJrv2VVTRdmVigkq7oRgQQHxzBbUXLqyod/LtG7vLdmauu02E1J9S mzVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; fh=MaRdoINVDbMgFR7MjtpQzzLPL8PWr7kkjoUHK2s9zKY=; b=nc6G5OOvaXirjm75PjXUlgfodSkDf8BCxuHxaiCQJTWXlzWd64yJRKBYzZFgsTsc/z Z2eh/bUGiBJFYq3dVibOnYhdI1duKpomy4a1ZVF/cvQASvfxNdXJKwu2bKWHcWzhZoD0 DQ+BcyrtUEKCHnF2gAmF/QvI8lx04Ec0S4s736WSrvNDJTETXe+7ny1f6AkbBYw1GZSN 7TBxno7iCnxJ1DFdQ3Fk9VgxQU6DCOR0RF/Tr/XHOPmgSdY+UqgcERf62gTO2BZ9Xtv6 uXmAn8mfRycIkvILqH93qMmUlLsjuj+oYZzKu8wT46h7KgRJ8KG7fHhPbKbM2n10f1Xa JfCg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b23KKU09; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y6-20020a37e306000000b0078d695b8b80si12378540qki.273.2024.04.16.06.54.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:54:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b23KKU09; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjFU-0001oP-Gd; Tue, 16 Apr 2024 09:53:24 -0400 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 1rwjFP-0001jN-CX for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:19 -0400 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 1rwjFM-0001ZM-1f for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:19 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4167fce0a41so30183335e9.0 for ; Tue, 16 Apr 2024 06:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275594; x=1713880394; darn=nongnu.org; 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=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; b=b23KKU09ePFrV1jVJJl/ioQJSuUgpPTMVX7uZDHfiyZDweIxQY56QHqQsukcYttyhv cIOjgnSuZFJQ5lu3NXnvHh7hjhYsscN47kIhyjjfyPoI4hL1+/ewr1cgmgvZ0tVNEtEU FPOVGnMGCfgFUNXfmWakC8hasbTGgNa+hYr0A3M8v2gwZA9lI7x3/jJ9HEtLf80QbxKi APKicOei6lluGwwahBPGJivJejlvU2slydSCVVLziA6yymXu0QdCJh3G7bmXrtHdK7Io uw0T30/lDgKPcSCxTE6rmdJQnwVW66UdCLpB8IZAp75VXn9U/R+MaeDoh0vNWi184Kes kKsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275594; x=1713880394; 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=r/B5UTN+VVzZIBHg8vuvzaIXLhoLwQMP7eYF+iW6nSk=; b=rMBlKv2SJ1aOslCb6d2UwSDnwX05pGkus/gYI5M2j4zHqYaNoApPUVmCUfUl/GJ4JV fNYp5blictgN0xAP3/2rehQUAPwaImWVRPRvt7lNQ0YT1wFEhKcQOvurxjN9o/tPcqLg hCwKyWl9XHOO1G+sGg6iwKylruHDgHCVOYUvXbPttPpSx16aFRxC/8pGELRneyDw/rYY xNZn5lVxXcORMSmBmol7Odhfupeq0I8VlZL3AwKZbDrVZnQYNWp4VR2QP4N0gLt1qEq5 PteJxPDNeI6n0OQInYZ2Yig1ayIwx7dFUAqQA+k0wUkQNpeskDVX5sxVzaTMGpawlvRZ YFsQ== X-Gm-Message-State: AOJu0YztJzbBL2Hv7U/iedaqqFjwx7ABbThZU6bvaJM2pxFUo/MuUC5u Vb5Bj02EYe1hcXxRGRlu9RF237XUjsdfWUBO+lN54QuqLu8YFneiVXP0bvKGa6uI+jFIk6JIs57 7 X-Received: by 2002:a05:600c:1c0d:b0:418:9ff4:3eed with SMTP id j13-20020a05600c1c0d00b004189ff43eedmr1222847wms.20.1713275593925; Tue, 16 Apr 2024 06:53:13 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c4f4200b0041892c774bcsm2586712wmq.2.2024.04.16.06.53.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Subject: [PATCH v3 03/22] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Tue, 16 Apr 2024 15:52:32 +0200 Message-ID: <20240416135252.8384-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize(). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 98f598382a..1efa4858fb 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_FORCE_PCIE_ENDCAP, XHCI_FLAG_ENABLE_STREAMS, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 328e5bfe7c..5d5b069cf9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, XHCI_FLAG_SS_FIRST, true), - DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags, - XHCI_FLAG_FORCE_PCIE_ENDCAP, false), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index 4423983308..cbad96f393 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_MEM_TYPE_64, &s->xhci.mem); - if (pci_bus_is_express(pci_get_bus(dev)) || - xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) { + if (pci_bus_is_express(pci_get_bus(dev))) { ret = pcie_endpoint_cap_init(dev, 0xa0); assert(ret > 0); } From patchwork Tue Apr 16 13:52:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789212 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296556wrb; Tue, 16 Apr 2024 06:54:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWToAgfHE55DsJKCJTDdsEYDehIi8gyr9+grnlByBLT4Yg8xDC8AGCLWnofswNvi77CxYajcT9Zuj4CGKAhkfkj X-Google-Smtp-Source: AGHT+IGgXvHmXvBd0qjI/bfum0oe7pCrTi2Oj/cUII+wWtCRRIrVoci7xfLg4VPEEQ/pXaPp4I+0 X-Received: by 2002:a05:622a:13c6:b0:434:e8c5:d79f with SMTP id p6-20020a05622a13c600b00434e8c5d79fmr18297539qtk.62.1713275667701; Tue, 16 Apr 2024 06:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275667; cv=none; d=google.com; s=arc-20160816; b=Oglu+dPj9Ob0bEb8x8XYZlvhCnT9hwyJ5wxo1QAD9JPL7yF+P7yFUlwvVKswRqXPHc BbYS25O9eTa8xWso4aKwLm7+tympp68INhloTgWEFfB8rM/4aXB4/2DRBT1C3avT0lwI Jx8AI/YyFEOqBm0HwpYrflxFKtqghrglevfwQljJISpEzzQacKIPs30g5xAMnwJhJdPz XLhdmhPf2L1+ff596zc23L3WtYzQr6K06C6ErElFvu5HQAbwHDwNpR7C7+fFY3w1vW6O FSwxNuf1jC7iczQNjAAi3C1RPNHOVVKGOSPwDQCzZO1JoiFn8IbhJnNikk5LWph8VyY4 v3KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; fh=MaRdoINVDbMgFR7MjtpQzzLPL8PWr7kkjoUHK2s9zKY=; b=VgjrFzxrDW58T0FMueZJipVwMJkt51F7pZEqqWA8rKR+tfrAFQf7YxnE+aA/ROcO7j afetM25xrhUfb02pAwGZj4iq3Ek4+pnVfCNcHJWRREcASW/PT1iLjncHtnuPp4dTUkSg yPtt/24Jvj5blfkwPU9HsXD+NRhlXEboZo0JTSqQhz39/ypHSYtGqYDihayv1nuJa+ob vTB/rl5cKvlb2vB76BnOn7DpH99MUvUv71Ndw4J3T24j1Y3fRNChJpFnMOhLjRXSrGi+ in96mSPN0vZCTfoCjfhfMDL7gd4KUcnWo8TI3ItsgGMY7hjCvxUgGnAEDSxM7EDuh7Ob 52wg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yRF1JSc9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u6-20020a05622a14c600b004364df5ca67si12550870qtx.115.2024.04.16.06.54.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yRF1JSc9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjFX-0001pO-Tu; Tue, 16 Apr 2024 09:53:27 -0400 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 1rwjFV-0001ol-BG for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:25 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFS-0001hk-0z for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:25 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-346359c8785so3413448f8f.0 for ; Tue, 16 Apr 2024 06:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275600; x=1713880400; darn=nongnu.org; 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=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; b=yRF1JSc9vOfeMJXY1dkhAcfTue6ucH2vX1XanashF2GYd98VwW5NZ5vQ+tjcRPmfgr kV9qq9CuKPIJKecDs0CvQLckdBu5WVQs6kzeMYgp+H02DbDZbUNJ/Q4yaybLs+WRqUfH GQ2B6iWApyQkXwVEl2FGJV3WlWY80W1qPcsy57QCVaeIjfyWq5FOCxAbzE5AcoOkVEqq wNm1pXanch2iOHScqF/uda4mfr7IKbTk/3ZGCW3KubmWxHgvKWTdzssYZii1q4npcu1T K7JCzz4/6UiUbUhuYjUZRnUXPYs4VH/NZHv1TOKtC2f3ZicylHHAal43yfUfNzmVqejg kAyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275600; x=1713880400; 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=r03IbH4Q5jukHMDYRNDrIPnxYvDkdnR4utG+Rvdo7L0=; b=Os5OSNqygklt64WripaVDVtt5Ih8/QgIVZGQmuHPE+IU417so3pbfykQB0W3Cbzsgj kxjR++C4ibGYn7PqpaeNKLMSWI/ViXd/+9q+Cyvj4C/t7HCmlZHxplhARSRxvHpYUYik x7wgispPmyK4nxqxKMwTm7DQ4V3MoPMXKG4HKsH7vmDy79Be18MVqMh2p4I00X8zBxaq QhoxuTZo5eKTRmuEbYaT7R04mBAE649vVbzKUghBhkCby2s5sH5HWvWhpWbvpJGUsqkl DevreJ7/NV2YuxS34qzTDleHPgqq7c2Us6YFQm5aPZufhiCtkw3aZdtOm358dVdyO5rR le5w== X-Gm-Message-State: AOJu0YzRpyu3PcVcnEBMvfp8NehYP1GX00z4RA/HCeQJcinIiqLg8WYY 0k3PV6uUM6pyGjD3ZmfNADzB5Yh9HKXu4zJUAf4u+LyZH1C9caiAhlByRsYDFpXdlqymICVqdbK A X-Received: by 2002:a5d:69c5:0:b0:349:8fa4:1839 with SMTP id s5-20020a5d69c5000000b003498fa41839mr924704wrw.1.1713275600053; Tue, 16 Apr 2024 06:53:20 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id df10-20020a5d5b8a000000b003437799a373sm14861606wrb.83.2024.04.16.06.53.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Subject: [PATCH v3 04/22] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Tue, 16 Apr 2024 15:52:33 +0200 Message-ID: <20240416135252.8384-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/usb/hcd-xhci.h | 3 +-- hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 9 insertions(+), 39 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 1efa4858fb..fe16d7ad05 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { - XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_ENABLE_STREAMS, + XHCI_FLAG_ENABLE_STREAMS = 1, }; typedef enum TRBType { diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 5d5b069cf9..0c063b3697 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,8 +41,6 @@ struct XHCINecState { static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, - XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index cbad96f393..264d7ebb77 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix = ON_OFF_AUTO_AUTO; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; - xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } static const TypeInfo qemu_xhci_info = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ad40232eb6..b6411f0bda 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport) case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index + xhci->numports_3; - } else { - index = uport->index; - } + index = uport->index + xhci->numports_3; break; case USB_SPEED_SUPER: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index; - } else { - index = uport->index + xhci->numports_2; - } + index = uport->index; break; default: return NULL; @@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x28: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_2<<8) | (xhci->numports_3+1); - } else { - ret = (xhci->numports_2<<8) | 1; - } + ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1); break; case 0x2c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x38: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_3<<8) | 1; - } else { - ret = (xhci->numports_3<<8) | (xhci->numports_2+1); - } + ret = (xhci->numports_3 << 8) | 1; break; case 0x3c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci) for (i = 0; i < usbports; i++) { speedmask = 0; if (i < xhci->numports_2) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i + xhci->numports_3]; - port->portnr = i + 1 + xhci->numports_3; - } else { - port = &xhci->ports[i]; - port->portnr = i + 1; - } + port = &xhci->ports[i + xhci->numports_3]; + port->portnr = i + 1 + xhci->numports_3; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_LOW | @@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci) speedmask |= port->speedmask; } if (i < xhci->numports_3) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i]; - port->portnr = i + 1; - } else { - port = &xhci->ports[i + xhci->numports_2]; - port->portnr = i + 1 + xhci->numports_2; - } + port = &xhci->ports[i]; + port->portnr = i + 1; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); From patchwork Tue Apr 16 13:52:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789214 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296786wrb; Tue, 16 Apr 2024 06:54:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWc3s/DaOujZWcJUQ1/svMk/LQHve1b2qK6bRvu6WI9ken4+31UHqGHuc2N3YDcZ2j3cvWX9teR6FkL7WpBeFcE X-Google-Smtp-Source: AGHT+IFWc2P/kuUhnwuijJV/7PjUoypyloD5DNpLuJRlx7vzCmf7E6bz60TUGvoCKVGpLwgb2hvS X-Received: by 2002:ac8:570a:0:b0:436:b95c:e7b4 with SMTP id 10-20020ac8570a000000b00436b95ce7b4mr10700535qtw.47.1713275696040; Tue, 16 Apr 2024 06:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275696; cv=none; d=google.com; s=arc-20160816; b=pap/zc0xMB+dmlafyV11sJOHjdDow3N8JzyfBazO6dDdk7nGqbYBGj1udSmdMP54uG xHly8UQurJ00J3XjiBbNhdVs+ZJxALOaBiqFfFyM09J5/ucbKNtOK+NkzyyfM3ElUXel 5uBSJw6OUAavfkit95nuQUHiy8caf3qOrnyHt44Dp2IPoUMFcfZV4go5aQdticKXH29p e6rGbGQ1WGylz88id+un4YnWu07sAVyT4PWhuYlTtEGTJW/DVYxAv8upSar+l1CkASLz vOf/7JbkAI5BoXz+ORKaGn42s54MiJOwZkamQ7Bd3VstwBSNNNEZXqefyjSfG1hHgxJ2 mqQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; fh=8a/KSKrN0m7aG1/xNcslk0oXaBVfGoSUqZaRA9zaCV4=; b=VTu6EDZNBBriY9gqQS5776uWLMFWEDhO1+MLXPPT4Hc1uLJqUKzd4KlVqkCNMj12zE CuVHrQtdSdd4/QeL0K/eIW8lWjHLBQb/mg/qp2F5+DDHtl87/lLd9+VxLrFvf2t7jlE5 kzocWSR1j7KsQzm7o8H5tZyXQSj+8XxW77DGN4ZED1aF8+EUEILWkAoAvicT5OA4p1NP hFiZy20hvFQTUPLFiLrU9fvN9yK7nxpyQOLJfgP9r1GiKatj6/5sBzOlL3r+gRQ2oVvr FmS2THEyLlFk4+QWYYtFMc/+Yg4Q/536CUe1iiAOr7q8wMpSMieZ98lzTYeCwaRRAasw mL7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qPxIx/zx"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r17-20020a05622a035100b0043731a2f0adsi2542761qtw.627.2024.04.16.06.54.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qPxIx/zx"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjFx-0002B6-7r; Tue, 16 Apr 2024 09:53:54 -0400 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 1rwjFr-00023u-ND for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:47 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFb-0001ku-MM for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:47 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a526d0b2349so266829266b.3 for ; Tue, 16 Apr 2024 06:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275609; x=1713880409; darn=nongnu.org; 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=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; b=qPxIx/zxfDmPvjJafmgwuzKHfdHrwCAci20orMl5E9GRPSpdt6ldtdlTmIZcwMMQEG Wb0VhVR6QgdJwSrpZ4dbV9pACj1Te4iaYjcfATsBpSUHHynwqgU60PvU0h/NlP7iFa9X y+Y9ITf83yGC2R8Yh8ckeh7W1IzWLyZ7WEqU7+oXEgewaOnwTh9jqTCI4HqqXGJWbyv6 Tbcy8TXcAqIErBCbAQyAUbud1FH2QhZn7TAhyw2/ztO6f1ZqQksIu/UEcxYqz6GC+MrJ L4Do1PnrUMnU3hw0kR3JwFC5x5k/pkE/v6TIhAp0I8CJJ1rDflbhRIpmqN/clDheJ+gA U3pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275609; x=1713880409; 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=GbDbMJ6uZWpUFLveYfiSh5ZQucMurGHlFI0AhTW7f68=; b=MBLFgIWO8fwvMcrWYah87BCjQbZSETrnDRnvd2X8cIFxy/0bDSGeITpMBM785NBlV6 2lq500FlkDbN6pfJY3vWeBJl1O7gEZ1FMhFe6ZtvJl8EiKDaDOdFNxSlpQyvIONopjxt 7ORIAjvvwp4rdD2vEV0j0pXeoTVu7nvGUDLInwH9oRpu1hEr3APsahQfGv8nsi9w7txw oF2mzYsMsaetoNH6loHu1BG8EEI3Yj1zFykER6II1zpO6itqp6BCK09z+oLO8UazSgMd kBo2wu1G0KS4wrAkW4O8ufqFiGQZCZsDld+NBTW0H6X1XNfYkpKLgxme+gIl3+8YdXcj eFTg== X-Gm-Message-State: AOJu0Yzdf2x3qNBjiZX++OPvpbsnYsYcJ0D9KdtWhk9DKTcL/djFa5Vi zX1HEghSKP3XnnBaRKukWvXkvN5+M6Pr4yNa83eVcgQTGNBqb0SjKK2DX2dyXLug7OUPy+pu6T6 / X-Received: by 2002:a17:906:1cd7:b0:a52:15dd:20d8 with SMTP id i23-20020a1709061cd700b00a5215dd20d8mr8989112ejh.26.1713275606318; Tue, 16 Apr 2024 06:53:26 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id n5-20020a170906724500b00a47423b4c33sm6892640ejk.128.2024.04.16.06.53.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v3 05/22] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Tue, 16 Apr 2024 15:52:34 +0200 Message-ID: <20240416135252.8384-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 62 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 67856f54c3..4ad724601a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -103,7 +103,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; bool rsdp_in_ram; - int legacy_acpi_table_size; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 53f804ac16..a6f8203460 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2499,13 +2499,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; - unsigned facs, dsdt, rsdt, fadt; + unsigned facs, dsdt, rsdt; AcpiPmInfo pm; AcpiMiscInfo misc; AcpiMcfgInfo mcfg; Range pci_hole = {}, pci_hole64 = {}; uint8_t *u; - size_t aml_len = 0; GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; @@ -2551,19 +2550,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_dsdt(tables_blob, tables->linker, &pm, &misc, &pci_hole, &pci_hole64, machine); - /* Count the size of the DSDT and SSDT, we will need it for legacy - * sizing of ACPI tables. - */ - aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ - fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); pm.fadt.facs_tbl_offset = &facs; pm.fadt.dsdt_tbl_offset = &dsdt; pm.fadt.xdsdt_tbl_offset = &dsdt; build_fadt(tables_blob, tables->linker, &pm.fadt, oem_id, oem_table_id); - aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, x86ms, @@ -2694,49 +2686,19 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * too simple to be enough. 4k turned out to be too small an * alignment very soon, and in fact it is almost impossible to * keep the table size stable for all (max_cpus, max_memory_slots) - * combinations. So the table size is always 64k for pc-i440fx-2.1 - * and we give an error if the table grows beyond that limit. - * - * We still have the problem of migrating from "-M pc-i440fx-2.0". For - * that, we exploit the fact that QEMU 2.1 generates _smaller_ tables - * than 2.0 and we can always pad the smaller tables with zeros. We can - * then use the exact size of the 2.0 tables. - * - * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. + * combinations. */ - if (pcmc->legacy_acpi_table_size) { - /* Subtracting aml_len gives the size of fixed tables. Then add the - * size of the PIIX4 DSDT/SSDT in QEMU 2.0. - */ - int legacy_aml_len = - pcmc->legacy_acpi_table_size + - ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit; - int legacy_table_size = - ROUND_UP(tables_blob->len - aml_len + legacy_aml_len, - ACPI_BUILD_ALIGN_SIZE); - if ((tables_blob->len > legacy_table_size) && - !pcmc->resizable_acpi_blob) { - /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, legacy_table_size); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - g_array_set_size(tables_blob, legacy_table_size); - } else { - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); + /* Make sure we have a buffer in case we need to resize the tables. */ + if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && + !pcmc->resizable_acpi_blob) { + /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges.\n"); } + acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); From patchwork Tue Apr 16 13:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789224 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297971wrb; Tue, 16 Apr 2024 06:57:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUINOoxatA4i/WHJ7bh+SgXf3PrEPOdKNHkpP6eNg2nidSYOR3xXcl7/fLMloR41O/jrHunkyd3qqu1JZ2Un61W X-Google-Smtp-Source: AGHT+IH9m+/mQQ2FXd9UvHGGAjEphGlaIUMmru4YQT5Hi5+EByfixIh74U7Ky6BfyHzUppcdaf5e X-Received: by 2002:a05:6808:1506:b0:3c7:7a2:1b4b with SMTP id u6-20020a056808150600b003c707a21b4bmr10294722oiw.48.1713275876780; Tue, 16 Apr 2024 06:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275876; cv=none; d=google.com; s=arc-20160816; b=kgkq17o7oRJWYu9qhDg9c/TwGu+wJ/xmSkqT61ej3iIOf7jG6/92rgmuEtFVB7kwj6 v1umvYtMLf9zj1EA9H75vhmXLlC0izQcI0s+pIKWHn9uO+dsIxEOoSBs1vByP1WAW3Sx FeCSFdXumkXLlqM3TKGgPHi8PvYDUSUpvAGQdgbCPyQeEGuHyIUOFaqsmGArFSEGR9xV H7K9SIU+PV1mYGszYWH5ynVc2FzCourYs3IxCn6qM+0wYaWhf2zFu2R0/6YXS4rGCCWf zaN8xzVH+YbE/HwPCEQdNUYAM/XF+v6QJlOBk9Z2eLvuWoF/Sx5oeErddClYbtSqZeSf EZ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; fh=4bGWK6aHmDUNMYAUChRjF6jGSZ31jg0glhkDhdFHxaE=; b=VteDg8DM1oRgAJyU2reGZBe+kkYdiOQIVB2JO162KvC8WAzOWScZoYKt8/rkNtj/HG DJB9AxnGeiCOyFxqSVxhJHVO9lugkgcRV4slBoRe0cM0q9dCnrp9Zx5f/8gRCNMpmgpG rprIJ3DSZe3qDKYnaXi625jkKUI+UHVBZfwE05pZc/Mxrjtd+6FzF1RDrjJAgH1q13rb xttDfb+KS+s1g0Hqr9gBQwQjobyZW9lu5jKAadwZrCe43v/XziZ2cq/oZyCxAHLGTeKj PrqxtlbyKGLmCqcqGEqiAMq/9x3x070b4jGweg65ZIYQOxbpMAOno5JLlY3091MgsO1e SuVA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fyH4cx1q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ay20-20020a05622a229400b00436aeb27ceasi9073097qtb.142.2024.04.16.06.57.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fyH4cx1q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjG4-0002K3-24; Tue, 16 Apr 2024 09:54:00 -0400 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 1rwjFt-00026E-1V for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:49 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFh-0001mi-0R for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:48 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-516cdb21b34so5680486e87.1 for ; Tue, 16 Apr 2024 06:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275615; x=1713880415; darn=nongnu.org; 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=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; b=fyH4cx1qdVNzxXdMjTmuryJvQ722mbCX0fnEBSq6CcFcOH6LNSzQAgXg4BwUtPlqBo 38dXIFcfwCwonmz56a/YQnYqH4j63Q8HBgGCIslBEMTcpA5Qs3ZZn9FMNcmtjrQuxhhS 7J6UBVt6dF+CRMMrDNLArRxSaAZRczH4rTiP5rF/H9p62qgnLw6DZ+L8ADsUfKxjAm2T seYx4VZ2jF9eFLePr1a9CNkr2NqdGfv9SogMqTnFuAPdjP4T8AsHxHE7we54+/dibS1D W6Bk++QHmXJ73eCxDaCIP8s1snCEejLzkqdGkVCSh/4bqOWDfdiAyvohEt8MFZmvac8p lywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275615; x=1713880415; 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=cesSegXMr71Lpaal5FJBOqynS/3X0jmvbPzoIKbt5l0=; b=P0hb8FQ/hiHoU7F/jjrmoYlikqvLAsNLXzB6d5xeZx+wpTE3Z5JbH2hcypCKo7DLHp Qgho2QRiY03eX8e0yQukys7wauxZQ3eeQQZyb0xoNAOt0as9U84kej4Rd5am1zQMLiCS BDfKxwdlFeUkJgw9iXsjSZDUjW/djlwbFfBQB6GWIGgBYgZ1JlTnp1co6UyqSYztW19J LZXHNrjWDqbyzxk3FEhCFdSV4RZdlSunywu7/F0dkkypCR+XrkOcS4EOv0lhyW3A2sQF rb28bh1MSrksPocxz3tqZPb3PgfYeTQjBMFys6hLVydUPS1GqrCt0Y/7CGJl8SDGEVGW orMg== X-Gm-Message-State: AOJu0YwCYCWXdjsEC79LQqbJgiWv2w9Ktt2LASMVlI0HOIMGk9qWKvUB 1mt2+Qa0yJ1lETK95xxpdxDEIl1iBxhpkDbawqKyXhCFTfmIje9DSf7x+e/zX/yvQ6dw4g0Z8j/ i X-Received: by 2002:a05:6512:39c5:b0:518:de06:31b6 with SMTP id k5-20020a05651239c500b00518de0631b6mr5266704lfu.3.1713275614821; Tue, 16 Apr 2024 06:53:34 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id fe1-20020a056402390100b005701df2ea98sm3337890edb.32.2024.04.16.06.53.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum Subject: [PATCH v3 06/22] hw/acpi/ich9: Remove 'memory-hotplug-support' property Date: Tue, 16 Apr 2024 15:52:35 +0200 Message-ID: <20240416135252.8384-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=philmd@linaro.org; helo=mail-lf1-x12d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org No external code sets the 'memory-hotplug-support' property, remove it. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 573d032e8e..9b605af21a 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, visit_type_uint32(v, name, &value, errp); } -static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - return s->pm.acpi_memory_hotplug.is_enabled; -} - -static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value, - Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - s->pm.acpi_memory_hotplug.is_enabled = value; -} - static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp) { ICH9LPCState *s = ICH9_LPC_DEVICE(obj); @@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) NULL, NULL, pm); object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN, &gpe0_len, OBJ_PROP_FLAG_READ); - object_property_add_bool(obj, "memory-hotplug-support", - ich9_pm_get_memory_hotplug_support, - ich9_pm_set_memory_hotplug_support); object_property_add_bool(obj, "cpu-hotplug-legacy", ich9_pm_get_cpu_hotplug_legacy, ich9_pm_set_cpu_hotplug_legacy); From patchwork Tue Apr 16 13:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789218 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297067wrb; Tue, 16 Apr 2024 06:55:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU4itFwcEIHzdMQ7WmIiIQc7v8EY3PMik1YQgex1IyH3eC3AWWzopyiYrB70GqjBTOglrJ6cgg5v3Wsr8kvzqPV X-Google-Smtp-Source: AGHT+IGOf3ph6P1YMYlaAbWcwC+X+0zunjOU0R/E/HZfF3OHZetzWYPdgpehSUWsIcDtO7gsYF8+ X-Received: by 2002:a0c:f88e:0:b0:69b:3c90:400f with SMTP id u14-20020a0cf88e000000b0069b3c90400fmr12787113qvn.32.1713275743660; Tue, 16 Apr 2024 06:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275743; cv=none; d=google.com; s=arc-20160816; b=EEvedVUC/zlqL6n5J+ToHZErwXY82aq669vVCC/JOw/SyT0TE0qDGMpLnJaI0oBwR5 uW1jSQyvT3ArE/KeauLr179jHIz7JQsaDfSt4uWEBvrU08LEPv5B1w+PJrLgUr6EJd0I eycKHHm5VvYlx+/bzXOkLfQRvvX+4dzeJplQPMN12k3j0gPFvtxBY0muVvH1rJpY+3fK lI3Lpke77mkJAa0Cuo4q9f8A7AxJsDhkfAdM8b4b+3moDXJ/TGQDxowmsdEOK4Cj2dv4 1kAPBxBxl4V0Dt56C3Wxx+rcDztfD7oSQoJA221Zn5jG//qDxjFgooyZn9L2WwurMUk3 ps7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; fh=4bGWK6aHmDUNMYAUChRjF6jGSZ31jg0glhkDhdFHxaE=; b=x0gceaWsnSWC+7IA7x3yWSgRIsNelXUC6duW/wWW6tUxZeiCCqfNYyuPIoJnkC/f5T HinPRgghOhNe77W6l5Myelx4NVddPSQFLgqChh6RbGiyphEprV6x21CNFQaVwD/PhJSR Y+kPMyr1p/xN6wHt10xM5K6ZaAZCczMACqI2RVMm2pzdWzepgMtkp7Ygj5GV0ez/htFL QqnGJDtuH7Bq33AL8ozU8BDE6krgjc+2dYP0UP/h+prdFqvGHjEX/8qK9wjhiyVnwCoj XUoNPyAee+L9utaGGwe3vSk0PtP2QqMAC/E0PdzBejGFKytR2CsG0C4zPYjMuzZMAGUo ey5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QN6TZe4H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c14-20020a0cd60e000000b0069b40c7f96fsi12478738qvj.310.2024.04.16.06.55.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QN6TZe4H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjG3-0002Jf-QP; Tue, 16 Apr 2024 09:53:59 -0400 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 1rwjFt-00026w-Ip for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:51 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFm-0001n0-M3 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:49 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5700a9caee0so4083316a12.2 for ; Tue, 16 Apr 2024 06:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275621; x=1713880421; darn=nongnu.org; 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=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; b=QN6TZe4Hi69s/Wjpnif8my+a9u1/mycfsRvLQ03ToLykSMJS4c3UZOnl/FBXmyky2l in3XIP4v29jyUprwEGFJziGnZWH92rrhN5K51/e92OwF9rwkxquZaCXdjv0SkAU+eu5t hYxZpf2ztOL0E4klNcJpuNUOHvOIgoa0IIRitJnVAEd9sskGx1ocrIz4v1ieFp1YQ+5c xZwqC5NmfX5Fm/lqc1TtlcOFbxnFjG6wI5xFCEbsiD18SfLCjDBTujN1JlGpKgSEfOjo 9gNMb2MMfHkW0MhNzyEHVDhkD9w9rrFk+HCHxswlRIq9TGDkypJ2VwjLUGTF3cBA9G5/ M1zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275621; x=1713880421; 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=aDu2aZ9r50YKxf+dNaxDqKUjAn6DYpDYAzbmilk8iWY=; b=RRtmaRK7KfzuyuFrm+U46tMEDmWQXdHjDPpBChmX8oxHLJWI8+TNV0bGUJnVaVtYDe rwYA0SvpJmICMIM++EqyIIXgClPGMMJVqcqyqsy6+fzZi7oHYAOwKVX0NQJ/fH3Mzgqt MzLCpzdq0vJKG4wH5n62g45zMKCOhn5nqdnRp8OSfzHDcoNpY4Y0+5RKT9MxGY2llHty StQywIdjnJCqm/e025g9NTDZNoT2wjbEgZXvK6eofWTgVRMit8f5bFYXgIxS/nLE9WrB U6fh5vXJbeMivXqkiqdNgttdQfJM8q0b4eoMzN0pZIoJ054XcvMjlEvi4qiTjPF3eCx+ MG6g== X-Gm-Message-State: AOJu0YxVprtcDCgHAOlMcrraUCiQ+d4E8rEo5xtR7MEZ2L6v1swvHAqQ olqP0PnMKY9DFiMf9Yjbe3LWiI7ETib1kJSztBiCJ8MoQKkDVcyzie8RqfF7m+xn3K+a8C/50L4 f X-Received: by 2002:a17:906:ecac:b0:a52:6ba8:8bf1 with SMTP id qh12-20020a170906ecac00b00a526ba88bf1mr3357576ejb.77.1713275620894; Tue, 16 Apr 2024 06:53:40 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id ho41-20020a1709070ea900b00a524318c380sm4976387ejc.80.2024.04.16.06.53.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum Subject: [PATCH v3 07/22] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Date: Tue, 16 Apr 2024 15:52:36 +0200 Message-ID: <20240416135252.8384-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org acpi_memory_hotplug::is_enabled is set to %true once via ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to check it, so remove now dead code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/acpi/ich9.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 9b605af21a..02d8546bd3 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id) .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ } -static bool vmstate_test_use_memhp(void *opaque) -{ - ICH9LPCPMRegs *s = opaque; - return s->acpi_memory_hotplug.is_enabled; -} - static const VMStateDescription vmstate_memhp_state = { .name = "ich9_pm/memhp", .version_id = 1, .minimum_version_id = 1, - .needed = vmstate_test_use_memhp, .fields = (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() @@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq) legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE); - if (pm->acpi_memory_hotplug.is_enabled) { - acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), - &pm->acpi_memory_hotplug, - ACPI_MEMORY_HOTPLUG_BASE); - } + acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), + &pm->acpi_memory_hotplug, + ACPI_MEMORY_HOTPLUG_BASE); } static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, @@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) && - !lpc->pm.acpi_memory_hotplug.is_enabled) { - error_setg(errp, - "memory hotplug is not enabled: %s.memory-hotplug-support " - "is not set", object_get_typename(OBJECT(lpc))); - } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { uint64_t negotiated = lpc->smi_negotiated_features; if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && @@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_request_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug, dev, errp); @@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp); } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) && !lpc->pm.cpu_hotplug_legacy) { From patchwork Tue Apr 16 13:52:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789215 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296870wrb; Tue, 16 Apr 2024 06:55:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVLtoCc0Gll3xhOTL5+JUfvzYybwXWitni6BtRctrRbaxDuluw45U5kMMwG3nvZNOh12rDRwSZhAoAiV4HTZEFC X-Google-Smtp-Source: AGHT+IEDqo1lz55TwQn3Qkz8EX81h9N9Nox3XmAEeDKFsvDeg2NFoBLwE7AniqLAcLB5Xb7ehLXx X-Received: by 2002:a05:6122:16a4:b0:4da:aff6:5eee with SMTP id 36-20020a05612216a400b004daaff65eeemr9163982vkl.15.1713275711210; Tue, 16 Apr 2024 06:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275711; cv=none; d=google.com; s=arc-20160816; b=ekcv5/4smKDFDr9h7jnAmvr5kuR8XFgYyjDNXnunNPeg1soTf092Da2CDX1Yzad6X/ s1bmskxl4E9nVz0BcdAJV1QfrVxQDOE3qavsZSzcpScXM0HJyrx3KCsbell5Jol0y5ra 0u0vkKbXttvHmSsuUCAPxuZ5K06dL5hLhy51B0FugQXw44pMQTVV9w5Q1qfR7wNG/nG5 ali8vbBFEVlk+2S0FKsbtrd/v1wdM08tU+o23XEdJrEZl1eHJnS4TwFx0XMKZWNZU/sR q6V7fVgBbd7AT39ol5v6WS4LtfGW20SZd8oJfXHMnQmSbZlYUPvheiJTzRr9MbAU/iIu MHSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fTaYd4OjLBjXf3DKJz8AWCQisMqrqe70/bylUuOkixg=; fh=5OCUA+doqgtSVf9yWNZ10wRW83EIHMMcZo9SVcrtVkA=; b=d9srf0tXOlnQCmxAkExnPfSNnMrgoDudUTXX+ySRyT7iVD+YtsZ5gZnt/psOM5cSoE ycx/esC0H0GMtGDTXxC2d9kJkfF3QO8hxfXSUPoepPpERvgWiUI2vxqUWxkUh9wb8MoG zk+mwcT4wUmOZJywhIylFtl5muL5lM8fp+7seDmb/tabEmKtzGXmPSYVx+vS0Z7xa3kt FdmVybyiL52K9Fg3n3zVe79IgurDpyUV44D9unL3il0lcNSzP4Aby/LGmCVocqIC9468 89gUc+uIddT+q5EM4hY4pgdn3X6Q27urwZb1+VRJfldP9n+9VlW67QRXKJyA0nBKfapS pnlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aP55iBAD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g7-20020a0562140ac700b0069b695f9579si8621745qvi.75.2024.04.16.06.55.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:55:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aP55iBAD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjG5-0002M3-3P; Tue, 16 Apr 2024 09:54:01 -0400 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 1rwjFw-0002B5-9c for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:53 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjFt-0001nt-8M for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:53:52 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a51b008b3aeso545270266b.3 for ; Tue, 16 Apr 2024 06:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275627; x=1713880427; darn=nongnu.org; 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=fTaYd4OjLBjXf3DKJz8AWCQisMqrqe70/bylUuOkixg=; b=aP55iBADZrGHjVsb6WV8saOT+Jm6Ed1rFJRJ/tuuEcoYYPufI2VaSZLel8OJTrV9Od AQtoF7DHglnX3Lgp7GyQ7+1SINkvLElxEKxpB0/MN68qiKcdyOF14OGibFf5p+maXuRX CSqoJaRaCCaenGTEZIWD6ck3fEZOrYrZw+kk88oGMh7WCEdnerTMIGhaSZqZCqinfD6K keiMFtTmB8HzChQxvZ8Jz5yhVPyNlcjZPnwLxtFZChEiw1uuriHHd776vpLpe0iLflAt wDFFu4wwBFgEqspkzY/Gib4skPGJyuRdFFQUUv2h5sk5n1UdOzEIpkWerE5vtul3XymA 8B2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275627; x=1713880427; 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=fTaYd4OjLBjXf3DKJz8AWCQisMqrqe70/bylUuOkixg=; b=Dj6ZyKAdW6e4Vs/nuyIJl2namuhPOwppGu3sMwhO/yhhs4Ss9coUAcEx84AFVl2D04 I198+KZSA1qkNGRNtV1w+4ZQIi5cEdbXYmmUG2qM9CdwPhWxS6VrfR9Frzz327+uKDZg 4LI3M5D+8cmRhz91uasd73jhhnBPCs2NYUEEftVVyrjjkLr6fIC5vuny/AT5ULL66ZtD 9FHtY4jMw1VlTCH1S/QA7KvgamszCPCYnB1v2lj/btzaNa0j33XnYiAwvF6drwgIIjoO q9P5XzdUD04joAYJxwG1YzFCnAr47AMi/kcxcoGOMPL2x47OaAElpBaOloQPBu/9bcaz 297A== X-Gm-Message-State: AOJu0Yz0xrNNx6WiVW5yEIsEzcAIqsNw5dIkN67dTqOSSUOTionRQihA jX1lzEcCce0ENbeKb/nTIAazN5HHSmUtTU6Y69Ocdn4t1xqvkZYr5u742fN5IbycRSiad1WIZ09 U X-Received: by 2002:a17:906:48ce:b0:a55:339d:bd20 with SMTP id d14-20020a17090648ce00b00a55339dbd20mr3213436ejt.51.1713275627114; Tue, 16 Apr 2024 06:53:47 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id qf30-20020a1709077f1e00b00a46a27794f6sm6807745ejc.123.2024.04.16.06.53.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v3 08/22] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Date: Tue, 16 Apr 2024 15:52:37 +0200 Message-ID: <20240416135252.8384-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The pc-i440fx-2.1 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-7-philmd@linaro.org> Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 4 ++-- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 7 ------- hw/i386/pc_piix.c | 23 ----------------------- 5 files changed, 3 insertions(+), 36 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ef4ad16d41..689cf3cead 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,8 +219,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.2`` and ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 51119e623f..01c55103d3 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4ad724601a..b528f17904 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -281,9 +281,6 @@ extern const size_t pc_compat_2_3_len; extern GlobalProperty pc_compat_2_2[]; extern const size_t pc_compat_2_2_len; -extern GlobalProperty pc_compat_2_1[]; -extern const size_t pc_compat_2_1_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 172814f604..cd6335d6b4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -304,13 +304,6 @@ GlobalProperty pc_compat_2_2[] = { }; const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); -GlobalProperty pc_compat_2_1[] = { - PC_CPU_MODEL_IDS("2.1.0") - { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" }, - { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" }, -}; -const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 80488a4756..2f28b4e329 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -66,7 +66,6 @@ #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" -#include "kvm/kvm-cpu.h" #include "target/i386/cpu.h" #define XEN_IOAPIC_NUM_PIRQS 128ULL @@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine) pc_compat_2_3_fn(machine); } -static void pc_compat_2_1_fn(MachineState *machine) -{ - pc_compat_2_2_fn(machine); - x86_cpu_change_kvm_default("svm", NULL); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -851,22 +844,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, pc_i440fx_2_2_machine_options); -static void pc_i440fx_2_1_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_2_machine_options(m); - m->hw_version = "2.1.0"; - m->default_display = NULL; - compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len); - compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len); - pcmc->smbios_uuid_encoded = false; - pcmc->enforce_aligned_dimm = false; -} - -DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, - pc_i440fx_2_1_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Apr 16 13:52:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789220 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297662wrb; Tue, 16 Apr 2024 06:57:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjOU8Hdsv00h0VyAdDJ3VFvTMv7Yy/VWP7fNcc6jXdO6YfxpIi/c5LXNsLz0SMvPiiFCm14cB4HPdAnTTlELbJ X-Google-Smtp-Source: AGHT+IFB2rs32vbDfzmb8jWKJCOqxYdMHVOvzylhN99v1NBnl4gvQKHG4s++qLpKls4H1qITUwlo X-Received: by 2002:a05:620a:46a4:b0:78e:f15e:3602 with SMTP id bq36-20020a05620a46a400b0078ef15e3602mr4283581qkb.12.1713275831591; Tue, 16 Apr 2024 06:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275831; cv=none; d=google.com; s=arc-20160816; b=0udGk4KqM7lrE0SdKC88766wiDoRXn+CxuX78gxvfdCi6VNFwOflyoz4G+w8JRLTvX y8h7G9AkqpR8uVHwXcn/dOB0VoLSC2/C65rBFA2z9M3+SiMsRym1jYUgMsqk5FPByG+6 es3CwMrxUDltuUTE1gqM/CnQAG+8yZdJXtATIFrPEJKVKnxiBPzB6CgMhNM9cFjP3WgK Fjud17AOPLJyd8Ls0CtkNbgHLhayCoCv7/FARTxWlIO8tTOojw8fMZtR+3+eD8pVTLEy LTCDkBPJZWiBRMy5tfn9juD91Ri5dh65ivqvBkRvdutlzb4Md2KE6QQgifXwvhaUWL7F nO2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WRu6gIdKkp2mUDaWmMaxQTExs6byim7bx/MfazoYUmc=; fh=CCdbmkzWzmJu9fiQGgKBS6VV2V2cG5HysLz/PiH7qKs=; b=QSX6t1/+ovkSTbbog1rUF1IYokYA2CY9fIBpcaLxnrYK//mwilLfzQJnT6teD84vRH UxxiIMY5gboLBXgy3KljsU+ZPyPH8U7ECcsgdNI+bi8lZ5G3YNUQwuIWolzuhdigAK1r bPTXOU0y4HqsVN8wM7jp5x2ptyB/4itEN+sy29OkvTa/7BQS5ss6lGYhEqdTVCUOzArH 0Z1pBlMs9Q9SUCZr/PnrVNjAehL76y5I68M88sUCdQbJ44p6CJPeS5NicelyMkw1vw6J CqUa1Y1RkAOL3lPIM4i6eSLcQOiIQtoTRZEHqsnP4gC2dTjwd54mySFmjVIN/E/gcJbr 7oYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a3ValaZf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w27-20020a05620a095b00b0078eba057e19si12786724qkw.752.2024.04.16.06.57.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a3ValaZf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjG6-0002P6-Ig; Tue, 16 Apr 2024 09:54:02 -0400 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 1rwjG5-0002MH-0i for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:01 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjG0-0001pK-Rs for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:00 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-56e136cbcecso5341711a12.3 for ; Tue, 16 Apr 2024 06:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275633; x=1713880433; darn=nongnu.org; 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=WRu6gIdKkp2mUDaWmMaxQTExs6byim7bx/MfazoYUmc=; b=a3ValaZfVsRt7AwaNcsfIdK/zd28l8JepYU5QBjoQr7ndWkReNfvvi0Z9xJ2P21GHa V2CVxp1GOZ+kViB6F7Jfo+vhsCjEFsDK2I6F6izQoGQkcSLIZTyysdCbQ3b/FNq4kUqr X8IZTEkTTpy6U7hQcP2TT9v0irx4lnU1WGN/dLqLSFtqBz49riuIY6D1BfrePSFzKDGZ 97EGjNpX+MlK/qBv0O9GsidReP1N7Gh3f+W/sANGYIukSFTEdR4qu04W6IlpMtX5nbCi DPvIwSngd1wk48sGtKiV9havaz/X9qq8C8O1SmK6T38G9LAtAn30dc3YeJ2GeGl2V46G uVQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275633; x=1713880433; 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=WRu6gIdKkp2mUDaWmMaxQTExs6byim7bx/MfazoYUmc=; b=Vc1PtjAh3Xo8BAsFJTrFwkzqWxZQNZ9bJYkaoxAAAT1o6HsyilBpNWT4nBeU55hCTj Ro4yGmQkhw+5Tgp5lAuiB4jUNxIeqBINdNCnScKqa6dJxmKPWnIhg6JE2E4FDh2+s2zh aXx61+owKA8JJY+aBghVURTqaH1I6tFR5b4Mshqy79VdqGU2IDSLQlPC7N0/OLWWIbh6 7jnm1cS657/xJrj9ajE00K1toqR/L//MnGTRuapJRyt7DAZvfHqY2efjTHrdMogMUpBH Q31blEzrf5NdgYVcj93boeOOJgOSshUeQHQmetF09U26ZaaZ9Na/FqN4uI0o2ElO8YMd vzpw== X-Gm-Message-State: AOJu0Yz6iLPuoYBspWVlAOCOpNgDOasBMffVE8lIuGtFWSpQ7d6M08lO bHa4jPe5oCW2cTv6Yef5l8cDBoLT9ZiL9vSAfWPIK+Z0IHMlKy7/S8vyY/t7V2VawdI0M0bU48p 1 X-Received: by 2002:a50:9545:0:b0:570:1de9:4cd7 with SMTP id v5-20020a509545000000b005701de94cd7mr6143993eda.15.1713275633197; Tue, 16 Apr 2024 06:53:53 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id n13-20020a05640206cd00b005704ae9272dsm240052edy.93.2024.04.16.06.53.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCH v3 09/22] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Tue, 16 Apr 2024 15:52:38 +0200 Message-ID: <20240416135252.8384-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Make it static, and remove its declaration. "kvm-cpu.h" is now empty, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-8-philmd@linaro.org> Reviewed-by: Zhao Liu --- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h deleted file mode 100644 index e858ca21e5..0000000000 --- a/target/i386/kvm/kvm-cpu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * i386 KVM CPU type and functions - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* - * Change the value of a KVM-specific default - * - * If value is NULL, no default will be set and the original - * value from the CPU model table will be kept. - * - * It is valid to call this function only for properties that - * are already present in the kvm_default_props table. - */ -void x86_cpu_change_kvm_default(const char *prop, const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default(a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */ diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c791b7b05..cb8c73d20c 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -144,7 +143,7 @@ static PropValue kvm_default_props[] = { /* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default(const char *prop, const char *value) +static void x86_cpu_change_kvm_default(const char *prop, const char *value) { PropValue *pv; for (pv = kvm_default_props; pv->prop; pv++) { From patchwork Tue Apr 16 13:52:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789211 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296554wrb; Tue, 16 Apr 2024 06:54:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOQY5OdDoD/a+tm7lvL61uxzQ9aVicwnBvgfhFPnzaBJ3BX9tcPWzDHDS9Af0Hfl3g+iujgol2Fs5gXCY6gSnD X-Google-Smtp-Source: AGHT+IHYznAn7N0LsaQY1KBueEDafO75Vu4RUbjjqHatgtgH4RGdIuoF2IVBxiJRIolmdOUSH/4I X-Received: by 2002:a05:6358:420b:b0:186:1128:bca7 with SMTP id t11-20020a056358420b00b001861128bca7mr18250204rwc.6.1713275667408; Tue, 16 Apr 2024 06:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275667; cv=none; d=google.com; s=arc-20160816; b=bx7EOR+ZrJXQwbvDntxfxVvEZ/P2tPeum+cXUtXbyr0Vc70QvaevqSe0axDH31/uZa 64ctqMLFJno8Ui7NvA6bFmzIoF3RxYz3eKv32y5Y08LSEz9oXrh40WIBM7KIyjUaGpcW EqcwpyZ6T5nOr8eXFuz5dZeiaOyD4wo5i1HCExVB+Fdg7dzv21wjpb3v6mKmoWMmY7c0 SSXPnHaA1FFyIVWBROtMApDO+7OObn4qg/6xYqr65RRGtsP4O6+aKsZQBN2IoMRCKVxA bLlj98KZnBWGjed1EwCvOLzE/Zyn78XTe/P55qWkcM6T5lnzyuvE1Usnlyb0JH7N3WH0 OQww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; fh=5haXPD3vE5WE9Of7Uj58emgiLhO4R0UBe5bivslROgs=; b=wTONtrGPuuulUJTmF4llpRxzeLEQ2VGXUd9aH2LCXLpWJLyRXbEam9kbt7fR7YOBxV v+fRY6JYelVEZiFbzZbwgdmdvJWqA4B9IZqafcJHaHqv9JuJPiUCbp5bFJ68YOqHKvKe jcq4AXXAUfF3O1oLamwU2383NfhhjTCE+0hFW6S8Vb5IfTNjXMaZe+3Kk4mo0h90ZKr2 aZ0ZtMJom247aw7IC0v5I+KAYqFjzJq9YJsiEebuluCHPGD0FR5rhiG//a8Oemlq/P/l PTn+2w6dUAaUHxj0rKZ8eAf24qkEQNitVHOWyvOK8vy2t2/rDV1ReP3HxZ3mW7Uu4DHi hj5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nT5CS1Dc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t40-20020a05622a182800b00434feb79d31si12916015qtc.720.2024.04.16.06.54.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nT5CS1Dc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGJ-0002pJ-Ur; Tue, 16 Apr 2024 09:54:16 -0400 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 1rwjG8-0002YN-9o for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:04 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjG5-0001pu-F7 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:04 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-570423c4f80so973934a12.0 for ; Tue, 16 Apr 2024 06:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275639; x=1713880439; darn=nongnu.org; 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=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; b=nT5CS1DcP8cMCSi8W4vlxRzaBmQtfKzCdcxNWIJbr14tMBZ1NeZNuX3wJTici29BlL qNrKaQJsrJkJK2P52LuyRZTr/Tr+RqMgaqsLmxc16X4ORblhEnDt4jOC/wjbX7GZjRpE 7NtPS2zk4qALXtQobT/HIY8JC1RsqTZ0vOAXavpofJts2w3yURdVwoYIEg9cYpyMCUof 3COEyMuGRZcutBroa2EkV51FCh70b7VO+yaJcEmKIzMT1BMgOZiUzD1l2O35c5nqgoZH VoaEtNiIliA5O3jlJcwBNewG0PSXlV7S49K1BEsoY9Ezr8gubAoxhWaM5pNmBhfwMz8b 9nSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275639; x=1713880439; 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=0cSOUYBAUJgDyQn/Z100iE3+Sgt5Cj+78hNwZltzxNs=; b=Kw3dGnP6oOfsPxfNjw54xeOYHl+cwHvwuBZTm1T65VrSA3SliOLTrJyX+FXSxjxky/ l8Cs+jzfg29xn22nc6A0aXe7LpmAhFwUqbGJFe1tbDWz1oHC3SCVlJsWXVM5DC+HK0iW fkr8MmWuSvDFJBvyseASN4KC7SXMaPM9ZiAg92porwdSBijM03oGfN01X3xe53CxlCfC EDLVQLR1/3lpTPoHGn78pg9Wu3OzqgKN7iVOfkIdk4zKBAElx/1w32Jz0V3H/y6Xta4v 4owwjgm8QmDgWIm+DFZorgGtr+F/le/RqbJ5FvZ0Q2O8sDlS5Adkg3ofoy6pzN+Zzzjf I0Hw== X-Gm-Message-State: AOJu0YwJdazt05rhs+Ew+KxpSmssvddHDuK4GWNe04R47BvY2D9rj1Ae BvvjrXO4wgWOvTjZG1lO7DARlWessG4SOUPbiow0WybPNF2xz6r11pJhiorTGSsilMqyY5MvAKt U X-Received: by 2002:a17:906:689:b0:a52:613d:e49e with SMTP id u9-20020a170906068900b00a52613de49emr4621712ejb.36.1713275639502; Tue, 16 Apr 2024 06:53:59 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id bv1-20020a170906b1c100b00a522cd687aesm6303312ejb.142.2024.04.16.06.53.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:53:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 10/22] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Tue, 16 Apr 2024 15:52:39 +0200 Message-ID: <20240416135252.8384-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 3 +-- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b528f17904..c2d9af36b2 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -109,7 +109,6 @@ struct PCMachineClass { /* SMBIOS compat: */ bool smbios_defaults; bool smbios_legacy_mode; - bool smbios_uuid_encoded; SmbiosEntryPointType default_smbios_ep_type; /* RAM / address space compat: */ diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index d802d2787f..f7c2501161 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, - pcmc->smbios_uuid_encoded); + smbios_set_defaults("QEMU", mc->desc, mc->name, true); } /* tell smbios about cpuid version and features */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index cd6335d6b4..2bf1bfd5b2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1778,7 +1778,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true; From patchwork Tue Apr 16 13:52:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789222 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297712wrb; Tue, 16 Apr 2024 06:57:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbW7MyMhgQhmJizfmq8NV0Vg++0JcKXifJovMI8DvLKtePW71ewo7KhIBesgA5eN5nHUZP4dwBafahybHuh+Ms X-Google-Smtp-Source: AGHT+IH0YRPtoDVKQoUqyI6t2ccrP1dooSpdgdF0IrBSpvVwIceOb8hb0sZUhtzQjRCKQlszQDc1 X-Received: by 2002:a9d:6b82:0:b0:6eb:83a8:daa4 with SMTP id b2-20020a9d6b82000000b006eb83a8daa4mr5077149otq.3.1713275836940; Tue, 16 Apr 2024 06:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275836; cv=none; d=google.com; s=arc-20160816; b=wO1g+PE4RYzhcvMSi269KKWK68j8kfCn3YFqDFLInYv+Dho0pe86IbRHvI0J5Pv41h E/fiNNXmchXsWQ/QRIblHxR4IbnkQMGJGDlqo77EIg5g2TcbKYQpOSNdLF6GQkEMeLh4 IbJ7v5U38WZMvbV8MIZEt2seyK93gXqWTIzkGPJe7CULz0TU/fMsspqPmFUfecTSIoiv NeHDnOYjCxLsNEkuezyjQnVbyRbi6a02/8aysmfR/WOjLgxz6HbrTPt89COLY4iB6YG3 vW7wO5wRU4hiVRqs5zWbMxMAGsy6lEBFQU4OIXDfEMJdDv2mKcjk68JAsg2wP1oOhNIO PVtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; fh=aEG8B3D8lFaau9WZ1Gr1cvkEZloMGi/YhvjNhFJdC3Q=; b=HzZQR1uC5zQKAAmGrUWbxH8y2BeGFgZ4GgYqVieJbEd6tnY8PiAftB0kgNquv2i6qr yv2c8pEybFG9Fwxn3ZtsP+Q334DJrR3j/9j8aXGsXfReoLnoOru2W0YEhhG4+kGcuLOS 1vf59WYGtgXWjhuzzlOVAXC6nB9smqNNmqky9csRciBzIZsF7hkSCBcGHUZoE4DLiihi 5poT2EoXFXMuBjq7JfkoZzE+WbITTzAThgO73hJ2RWYiJLzJ/bWQtSj4MsKm1OpSJGfj YZQz/6ob+QgCAjsB0k86StXIQKmOQNxikpdhtuOTEw52Cc75wCTuIAzsJ2Xof6m14/Dx ueNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eKE+BoUe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qp6-20020a05620a388600b0078bcec2939asi12580637qkn.38.2024.04.16.06.57.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eKE+BoUe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGO-00037k-KS; Tue, 16 Apr 2024 09:54:20 -0400 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 1rwjGF-0002ok-Ul for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:12 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGC-0001r0-G9 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:11 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56e69a51a33so4328417a12.1 for ; Tue, 16 Apr 2024 06:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275646; x=1713880446; darn=nongnu.org; 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=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=eKE+BoUebL5WjsIkKju9B9igNMd8zk94zRmWT9YlQ1bQcklpByc2mQ3Jpghr+bumm4 4PGzTW8yFFL+PfGYZstYO6J8J9Vwx0gvo4gQxFnc+b85dVAP2t8QRGFFNjXp6z6wrAdM KGLn3RMrMIyly+hpWHDC7lgJZvB6gBKqT7HePnN+RYWHKqkFPwBJaUClmV4N+LitzM0i OU+w4V4Y1bmZK14aDs4Y/Wv0WzREcXOn4ABoUSAeKKhQVQOupzZ/Z/sMezmMnnOJinrT Br8KKSzKqwmlwc0dv8Pgr5h9yAf1QDABmvNxUjq9zFMaZpQ4dg5111OVp8vMHCusTMO9 Z2Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275646; x=1713880446; 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=UuGQRWMqmr6ruVhTw3v1+AueGwovFmnNusAak3fPiJU=; b=JS/H7zkYuapZ7ejnsvLirFTJeCBziP/QDT2S0sFVrzwTyHaQSmIVyZrk5VahhS38Ns JIxtPv+Y+WqCN8/tJUmCxxwpZFvJIid3C3aowFeDHmMhVVwKQWv35/k6OHjZNQCr41Ou /eoUosVixi2TCZFmhtmGWc4HIbuP2MdQ6kjUwDKtFvqZWwlQkb2PqJI2LBmV1DxLn6bb vNzsSe5qv5pj5gEReeop7KbQy80SLgYrDUCyQ9Z7P/mfMBiQ/zjZL/evCmMz6XamUmzp m4lQiIdyT9t3UgSdhGLc2rS3T8jM0P44TdVFKO/Cul6yeU9rDFQmXEy7S940e7ayzXNg qPtQ== X-Gm-Message-State: AOJu0YzUOLhB65uta5biDre0ayZ2M7F/K73F968imd9oOI93WT+ULzAP xluXF8ehqQwxg9isqxK0mokiQ85Cms4pU0v2rpAT6ki7Nlv5XnEQCV58g/e7ovjrWLN8rUTJB70 Q X-Received: by 2002:a50:d55d:0:b0:566:d333:45e8 with SMTP id f29-20020a50d55d000000b00566d33345e8mr8949322edj.20.1713275646553; Tue, 16 Apr 2024 06:54:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id ee42-20020a056402292a00b005701550ddc5sm3802566edb.90.2024.04.16.06.54.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-arm@nongnu.org Subject: [PATCH v3 11/22] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 16 Apr 2024 15:52:40 +0200 Message-ID: <20240416135252.8384-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'uuid_encoded' is always true, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 8d3fb2fb3b..f066ab7262 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size); void smbios_entry_add(QemuOpts *opts, Error **errp); void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded); + const char *version); void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp); void smbios_get_tables(MachineState *ms, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a9a913aead..a55ef916cb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1650,8 +1650,7 @@ static void virt_build_smbios(VirtMachineState *vms) } smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ? "1.0" : mc->name); /* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM].base; diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index f7c2501161..ecc4047a4b 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, true); + smbios_set_defaults("QEMU", mc->desc, mc->name); } /* tell smbios about cpuid version and features */ diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 441d764843..00d3005e54 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -355,7 +355,7 @@ static void virt_build_smbios(LoongArchMachineState *lams) return; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d171e74f7b..1ed9b0552e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product = "KVM Virtual Machine"; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); if (riscv_is_32bit(&s->soc[0])) { smbios_set_default_processor_family(0x200); diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index eed5787b15..8261eb716f 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,7 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) } void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded) + const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded; SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.product, product); From patchwork Tue Apr 16 13:52:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789216 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296896wrb; Tue, 16 Apr 2024 06:55:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJlqKRTQm4z0G4m5EIkinKbBYVFgvvqnQd6TyJSW/Bz3Ub6TGiLq6byFbyrxYvENoIAz/63auoSRhjKVWRYerg X-Google-Smtp-Source: AGHT+IF4vSmdOpbqqgipqrFgylQ3szHrPZWB50GNkWYMrqlKGOsS4E6VCGsQed+tMjPQBh2hU0MV X-Received: by 2002:a05:622a:5d4:b0:436:b23c:2839 with SMTP id d20-20020a05622a05d400b00436b23c2839mr12650568qtb.22.1713275715186; Tue, 16 Apr 2024 06:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275715; cv=none; d=google.com; s=arc-20160816; b=zDYMIX7i0XFIBfiXBbuuDgoDfH0/653PWQS3PPLJzag2J4tUFbZjAZNWlEkcfqmsUU z9rrgK3JNsGofNEjDNg8gXH6bUZS2o6Yk+pC7yTYrVjw4UzWGBJI1Vxi7A7ajg/0XC+v Ruo3CqXi50nhZdsaH5bqolsUpS0o0P79mIdZ60BpsUSmAOF/P4NWgwHog5t+i9FxPGIw k98A0pc/7rlceCD1zakpknKzVeQR12HldkouwlCcaX6VNoRia+qA62ft56bLgFi9pZfO +sNufDnhfIAB3RKvW4/l5bnbH0fQAizyXLFe2ZCjYx306XR6H/cuISWEyneo2jXO1lg5 KygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; fh=dUUvmIu65tdQ0um/meyBDxDLUKR1CnrLpZ3jlbEBd0g=; b=BOu99bWd3rMh0U37DcgnZpDwkaiReKKii9iyGovL/Cw2C2CZKSVEohWwrggnhZbJW8 R7CfsdgFUeNNwIOk4uT6otBKATqvqGIjTL7n6uucYnzfh7W2B4FMgbuXf0XemtzwEc+G 5nO42naOc3WDgH0ph/zwv9t2SMgq2pVoS/6FD+e2zkvrujRvFr6397Af2NDZMtgCmvRg 6JmgcUY0e3o2DqXiAqsuiW/cT/xSj0iWwtuBL+/TqeNoY2oep9CufbV5z6GRvM2gNVf5 4G79rY91JYFC2Y3J3x93uIF6FAer2vcfu4m6o8BDr0qFF7JmgmS0NHKUwMfCgPpl5xi2 EJDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NkqQ9jYU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m17-20020a05622a055100b004365cc0752csi12023698qtx.227.2024.04.16.06.55.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:55:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NkqQ9jYU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGQ-0003N8-Qi; Tue, 16 Apr 2024 09:54:22 -0400 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 1rwjGJ-000308-MK for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:16 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGI-0001sA-3j for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:15 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56e2c1650d8so4418199a12.0 for ; Tue, 16 Apr 2024 06:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275652; x=1713880452; darn=nongnu.org; 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=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=NkqQ9jYU5x+proCeNpNSj+Iw2v6xVxmdRZE2io4XmOHGo9Pd9R8Rpiln98sql+8FwQ ZypMYyquyscF/aTKvpxc0MF1DoNJBji6wnEE+lM2yvg6VdAtNSveM+iKviDAu7724YGi 5QCAKimMWQyeWVIljaHTzxmh51xLkDJmC+wOmHLwfIpM3PtvBkJiXbvtcf/k0J4EPfkm pzv5b17vTsAzd8UBgHIuALUPC5d3TiORz+LN6AC0DDrcHr9kGnZ6zor7Gpf84Wp5tZ4K 4BFrsXeErVUnetyDtivoIrh6FukngierXR7hkET+wM0Tkwzho6BdCkMw/6vUZkcA7mWo rWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275652; x=1713880452; 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=xnRVHCDouTA+5HlMl31thguywp3whz3Nvn7kAUajqzI=; b=bZhvTZWXv0f3FRuR2B+Mu/cozEjdY0imiP0xB4rVvsarL39v8qUhiNKSHXHOHfaNdy +l71tNDpE3jRTlDuXfWkcMNCXqOjZRfEOZVObM9FLV5nvF3YEzkInRJY5z81bfNRDIJx d4CxVuhktV5wxaKj6/Eb4Rf6t4YHr4Vx0H1fSwGKwwwV7E43YXv7Mq9f4go79g8vMdOE PsV+Bca7vd14i+7PvR/Nr3YF552sKPT35eN+fZi/R75WBrSZ/aKKH6bhoh+iCnVI3b+n 6rTQ5uTmxq9NjcvY8+nh4eqzCBrDcYbVcoP6H01INXaL038Hpm+U80+bnoKjilvqJxIt GiHA== X-Gm-Message-State: AOJu0YzXj4dod8OQ10jiPnengeTjCB13hhn7r8Uf7eeN9ZF7QiEctbIm myFoeOdrZiRmg8IYjbNYA9GiO7uxcIpaWXldHwN/z5JbdBaixRYbtNJVINCAresyC3MSWRA0FPb w X-Received: by 2002:a50:9ec8:0:b0:568:32cc:f808 with SMTP id a66-20020a509ec8000000b0056832ccf808mr8400333edf.15.1713275652383; Tue, 16 Apr 2024 06:54:12 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id fi11-20020a056402550b00b00570498c622asm375182edb.66.2024.04.16.06.54.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 12/22] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Tue, 16 Apr 2024 15:52:41 +0200 Message-ID: <20240416135252.8384-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 8261eb716f..3b7703489d 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,6 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void) static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { memcpy(uuid, in, 16); - if (smbios_uuid_encoded) { - uuid->time_low = bswap32(uuid->time_low); - uuid->time_mid = bswap16(uuid->time_mid); - uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); - } + uuid->time_low = bswap32(uuid->time_low); + uuid->time_mid = bswap16(uuid->time_mid); + uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } static void smbios_build_type_1_table(void) From patchwork Tue Apr 16 13:52:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789213 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296609wrb; Tue, 16 Apr 2024 06:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWCapb5i833jczuddYMlN6NGap7g9iaV3Ir380SCKIxep4FjlbDLdnqd/dCq/iaoIqDabC/r7CyfdCWE0ByIssh X-Google-Smtp-Source: AGHT+IEn0F0pTKBQW3P3muD2idOFCkWksZvNP8ZrpWN2H4xDZFdZcQT8P48FcFrYb7tr8PMtZiNe X-Received: by 2002:a05:620a:12f6:b0:78e:db54:e5fe with SMTP id f22-20020a05620a12f600b0078edb54e5femr8786401qkl.11.1713275674599; Tue, 16 Apr 2024 06:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275674; cv=none; d=google.com; s=arc-20160816; b=GeNnDR10uiV5MXGLtVPkI2KAGoWfFBrA9DM2zoimjMRwkweF10iQoCLcGGDBQ6I26w J1E+/v+aX+zDOKhMCcjvp3jQ7GJOEFvk9AgKLwJe16L/Vs9+GdRlTd+MgHwj1IuePWXk 7xhkOw1kjl/M44bwRlvrUaYAakg0a9l+9pFzGD/Pz/ymDVXgpgZiNgPKGduMCsc/xg1z pdtHsBibiuzvGl1mdDP3TcV3n2EDfHanA7tuGrB16O4zpkFfo2wWMXX3gmQvdBzZHxvu t6LBHvRzr3ycevwf3IZXQYPMA8GOZK5HxYasLpH6sqa26fhyoUXvpQHva5DGFjxorQ65 Ythg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; fh=i/qt2IY8D6rlbppcT4ZgEovixdm23W0hw3Pg4MhQHns=; b=uW46NqR8Wkmh6j4GZ/ngnXWu1gXv9LrnlleFgQFhW6BexbAqvV/PH7OWcj/L2XqG+2 fn2oFRIBSbw5w+9e9YNmMIwvhZdhlv2v9n9qf+KwfJEDKNiPpUD1TSN2H78rNqG/zS3B TWDKJalIxoEkFNlED+sHuFqKP6NUY2d9xcgLmZSuJKUpYmWZ3uPx7sOI0viJPV3wgXOA NXKsQA7HR9gZaHOEoAroWk46jbOSwRXN+YCgPUWUKbM12TTu0Ym/c5jA8Kjz6yrpPqej BunNkgutO4iI3hlLDs9bDB0AnoEV43hMej9U0bzAC1AAVup22BrYHsNQvxSH8sU+RXnG COkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SZ+OYxK/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a26-20020a05620a16da00b0078eba18c1e5si12500642qkn.705.2024.04.16.06.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SZ+OYxK/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGU-0003qf-43; Tue, 16 Apr 2024 09:54:26 -0400 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 1rwjGS-0003XC-00 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:24 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGO-0001uU-Vr for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:23 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-56c5d05128dso4790629a12.0 for ; Tue, 16 Apr 2024 06:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275659; x=1713880459; darn=nongnu.org; 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=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; b=SZ+OYxK/vkDRQuDA3dPwPK0lyX9ODIo9jwYJuPFtQwoFsui376b7V9ARlz0dQ1IclO FNz5rqDpLUgJJs16KAtwvksbEevRSm/5wHDyVmiZ/Cmcm+Sqz6bEcbyEts+IbOddfNnF xggipkPAH5QkhKP7IxewtKrIwRheBq9cKvKvOlX/nwPxK1wyA9MT7RFWe4J0v3XS2eL4 Sg0moTCT8dkmskCThBqSH8+Z7zVCalPKg2wRKDH+RJAu34N3u73taT9tFc7U66NJ9+oP HWHxZnRbGJy8DJMkzP18pobyIpOCVlu9PgrLw9OJqTFRS/lx+qYb9apqeMeI2gPVHkEJ vIbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275659; x=1713880459; 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=oke/YPM4C6ufallz55sQ7YyPAmP6LUvQ2Lhm6MsGGjM=; b=l2WBdozj6Vbm3acEkPf5rxSCAyiElcchs/KOiJLfSUH+nx26O7vovY2iilM31omzkE E0KqBC2lmpLRw6eCAnHSPpYr9/MWPWE/yyHehzib9qdDpGqkozzdeZZgrmgv5hG9t6Bg Drg2zuyht6pxE+gYSQ9ERJxDvnlS0rr2KTBIu6BdFDkSvCIkHS8tn5mRyfWSwVIgzCIE A1ExbxlN8mA3H+akSi+Mxjh4Gl8aLlxmaQfYybruSpk26D4zFpewIeIgPH8654t74dkP EsT9fn+NkZ8ObJpzqXZEsCTWfhD04AHG5aqCiqSzDOR9PBinuIX3Je5mMeqxQMW/VgqP GoDg== X-Gm-Message-State: AOJu0Yxwx7bUhy5BMcrsuQI6KI09m8ryxDvUoNwqLK2reMBmUG3ODI42 NzIZ0ITlFU6LNQK01Yxf1rKF4ngh4gwy12Wipv0O9SyeN5yt93SP+fKIJIlIFpNbd7FjCybq+c+ R X-Received: by 2002:a17:906:46c8:b0:a52:42ce:7da6 with SMTP id k8-20020a17090646c800b00a5242ce7da6mr5855717ejs.10.1713275658677; Tue, 16 Apr 2024 06:54:18 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id rh4-20020a17090720e400b00a5255afc856sm4100307ejb.84.2024.04.16.06.54.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v3 13/22] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Tue, 16 Apr 2024 15:52:42 +0200 Message-ID: <20240416135252.8384-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36(). Reviewed-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- tests/avocado/mem-addr-space-check.py | 9 ++++----- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c2d9af36b2..231aae92ed 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,8 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @enforce_aligned_dimm: check that DIMM's address/size is aligned by - * backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures. @@ -114,7 +112,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool enforce_aligned_dimm; bool broken_reserved_end; bool enforce_amd_1tb_hole; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2bf1bfd5b2..c7bfdfc1e1 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -716,7 +716,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms, hwaddr *base, ram_addr_t *device_mem_size) { - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); MachineState *machine = MACHINE(pcms); ram_addr_t size; hwaddr addr; @@ -724,10 +723,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms, size = machine->maxram_size - machine->ram_size; addr = ROUND_UP(pc_above_4g_end(pcms), 1 * GiB); - if (pcmc->enforce_aligned_dimm) { - /* size device region assuming 1G page max alignment per slot */ - size += (1 * GiB) * machine->ram_slots; - } + /* size device region assuming 1G page max alignment per slot */ + size += (1 * GiB) * machine->ram_slots; *base = addr; *device_mem_size = size; @@ -1285,12 +1282,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - const PCMachineState *pcms = PC_MACHINE(hotplug_dev); const X86MachineState *x86ms = X86_MACHINE(hotplug_dev); - const PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); const MachineState *ms = MACHINE(hotplug_dev); const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); - const uint64_t legacy_align = TARGET_PAGE_SIZE; Error *local_err = NULL; /* @@ -1315,8 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), - pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, @@ -1780,7 +1773,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported * to be used at the moment, 32K should be enough for a while. */ diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index af019969c0..85541ea051 100644 --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/avocado/mem-addr-space-check.py @@ -31,11 +31,10 @@ def test_phybits_low_pse36(self): at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when we have 0.5 GiB of VM memory, see pc_q35_init()). This means total hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory - for dimm alignment for all newer machines (see enforce_aligned_dimm - property for pc machines and pc_get_device_memory_range()). That leaves - total hotpluggable actual memory size of 59 GiB. If the VM is started - with 0.5 GiB of memory, maxmem should be set to a maximum value of - 59.5 GiB to ensure that the processor can address all memory directly. + for dimm alignment for all machines. That leaves total hotpluggable + actual memory size of 59 GiB. If the VM is started with 0.5 GiB of + memory, maxmem should be set to a maximum value of 59.5 GiB to ensure + that the processor can address all memory directly. Note that 64-bit pci hole size is 0 in this case. If maxmem is set to 59.6G, QEMU should fail to start with a message "phy-bits are too low". If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU From patchwork Tue Apr 16 13:52:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789227 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp298089wrb; Tue, 16 Apr 2024 06:58:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnWKGOs66PzJHZC9t8mA2Vn3hfbbyZN92NDcrhYBW7s3KlhRUamS8ydAm8BN6BgAZsaSUR3iTyPeXQrRK4KqyT X-Google-Smtp-Source: AGHT+IEx2tDkBSke8KpsCawynWY8gQ+jhPZTeuwpfbH6Ee+de3a+Z2q2fy/v+LtSVSgCGulLWyU7 X-Received: by 2002:ad4:5a4e:0:b0:69b:4cc9:75b2 with SMTP id ej14-20020ad45a4e000000b0069b4cc975b2mr2944666qvb.20.1713275895884; Tue, 16 Apr 2024 06:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275895; cv=none; d=google.com; s=arc-20160816; b=vKn4oNn6H16/9zqCHxSpN9SBioCw/MybMscrvnr/yyI4qvfZxKBYJWl+t2typRNvTv Rpfcp8sqQ1HgzkhfNF89Wh3hqG0XUcnXxxYkZNxdyP26waBWw7nRpFxO2liA3vULFrpk kGrgbdVwFMy74/3+2cq4mofLsOixQWP/+aycasTMKYGMkuVtCmytLHPlmfhK1WZzw67J NAb1MhlR+ClPF3MhlEvgAhMfnlJJl8Fv6xwHBLNB5/xGUveCqCAPs20Z+KcIWleWxYqb 8oUSR90ZzAPfNAOQxbaPhqUCKKkXsUuVyi2E/+xjaiZybo9ZHsVBxIdwz3Gi9TxRII9e m/2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tsrnbZ/xEVJKz1N1FMvTxZQqN2f7puK7xmLkanRPsWY=; fh=5ULar/d3j1Rq5snkGrUVYzZ7i26QdyN+vEuNgnfTYqY=; b=heeIlZIEmeQbD4/pOMeHMEOBPyn5lOk81napGdFHiUVlf2pgwz7/KZxsMJdqeuVECZ 42xUDghezfBRorZqO16U4hPm+4Fst/CTj1KiUlQ0SaqEAqgfeD7az10wi6IO7zoCrClC cgxR8shBkaCN40aZs1gH7d2Yj7KMOxfwfIJyb/j8hHqFmiPzYg4Xcbab/BcXyPa4qfyS 1nE+O34a0DyzDhd6rzSTaFKLqCS+F7fIjWLH6lWvVVe+zlXu6Le3e3a9YK3EjdO0rurg 1dQNmjUyDVAR1kbb2Ny4J2xuJBp1f6EsefCd46lrTl2k8FW4oKPVVysU/Ym0vCZnAfjF YrWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k838FdLX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jo25-20020a056214501900b0069948077216si13827672qvb.267.2024.04.16.06.58.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:58:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k838FdLX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGa-0004bf-5V; Tue, 16 Apr 2024 09:54:32 -0400 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 1rwjGY-0004Qo-RN for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:30 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGV-0001vO-F2 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:30 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-56e78970853so8407705a12.0 for ; Tue, 16 Apr 2024 06:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275665; x=1713880465; darn=nongnu.org; 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=tsrnbZ/xEVJKz1N1FMvTxZQqN2f7puK7xmLkanRPsWY=; b=k838FdLXHRA7Ses3XAscsKoNMS93EQr/Qle1Qzpr2H74i2uIl3HmqIUOYiNnsIqRRA jqeICBWTTrUk6bDkNizBYowJUi73k2fuRnf95fYKlvf7IVazw4ra9XLuaaFcNeG02sb4 vXYeXxibZ4Ec1n/nSFbm82m3RuFf+jA7bleDk2BOkJLHvEotUUPI+fH3rnhmE+BAbCO2 5x6vOHSv+9JsNLXt/tJYre1YyC3ug1lLXajvwo6s+42uEeOzOkjpApgZK/L5yqjDbxNn XBCV7m0q1EzMJHB+0LVX22qNzI/5b0NUATU2HQkFV+Y1aErE4u8pHv24ITXJcEDID58g S02A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275665; x=1713880465; 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=tsrnbZ/xEVJKz1N1FMvTxZQqN2f7puK7xmLkanRPsWY=; b=vazX7/+1ZL/5mnDyi9S3gKmzpO47rHtLKqUu150Ms3KpHAFlgiwTwq6PZUKfcbz2fH ZOSGdojccZasLmCNntAp6OeErl62pZC2oCdOC8639j+F2gr1j6HFb17+ZDajCWAMA6RB oBt3VlQ7ftKk6thCNeprmqauyaVqd5RLYH6S7/dhVTghfDq39ftRTpBsRJpHXTOITqTr qB/70Qeb2leErYgsUkrCFziT7t82PNGIjHZ0batpz7QJiEuxoIDue4CuxsWu8WJxlVsd AArMQB+/3mnoL42BBhMuY57Vh5LzBG0kKy7zI/bH84aMyAw0o1+QAw568fsm0P/B7d5t vdhQ== X-Gm-Message-State: AOJu0YziEUz496cxPR5CuyXK3kUtWMvh8XwC4xJkRS1ezACMyVo22hRl 9NUtt2CUsiE5R4n+aOX5k6bA05WaZqFU0nsIQbOFTTXcT+4xYBoJMHMUTh6bqSUOOoCJHiXzYBT p X-Received: by 2002:a17:906:f74c:b0:a52:9e:45c3 with SMTP id jp12-20020a170906f74c00b00a52009e45c3mr2136288ejb.35.1713275665453; Tue, 16 Apr 2024 06:54:25 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id y9-20020a170906470900b00a51a74409dcsm6960354ejq.221.2024.04.16.06.54.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Song Gao , Xiao Guangrong , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , qemu-arm@nongnu.org Subject: [PATCH v3 14/22] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Tue, 16 Apr 2024 15:52:43 +0200 Message-ID: <20240416135252.8384-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-11-philmd@linaro.org> Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu --- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c | 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c | 6 ++---- hw/ppc/spapr.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 322bebe555..fe0f3ea963 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -66,8 +66,7 @@ struct PCDIMMDeviceClass { void (*unrealize)(PCDIMMDevice *dimm); }; -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp); +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp); void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine); void pc_dimm_unplug(PCDIMMDevice *dimm, MachineState *machine); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a55ef916cb..7af05a6a2d 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2736,7 +2736,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c7bfdfc1e1..9ba21b9967 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1309,7 +1309,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 00d3005e54..af71bd2a99 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1025,7 +1025,7 @@ static bool memhp_type_supported(DeviceState *dev) static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_machine_device_pre_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 37f1f4ccfd..836384a90f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) return host_memory_backend_get_memory(dimm->hostmem); } -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp) +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { Error *local_err = NULL; int slot; @@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e9bc97fee0..f147876dc9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3668,7 +3668,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp); } struct SpaprDimmState { From patchwork Tue Apr 16 13:52:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789217 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp296931wrb; Tue, 16 Apr 2024 06:55:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU55lfa7uSgVXeSkVdALVPFv5ZNIa3yjJWlnJ608lZfktKCFe6AfG4L6nlFijE28UhhoDrdm4MLWZHxtRygmAXk X-Google-Smtp-Source: AGHT+IEXzA098FZySmXltAzEAjdpRanWCm0DAXhea7uYP+WIkOGpS0xdS5YV9HV9Slu0dEKx1Ori X-Received: by 2002:a05:620a:40c9:b0:78e:d698:43a3 with SMTP id g9-20020a05620a40c900b0078ed69843a3mr11938269qko.41.1713275718929; Tue, 16 Apr 2024 06:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275718; cv=none; d=google.com; s=arc-20160816; b=W9WBVwcLhzWiAOPS7RopPjkxYLLZLEsqvOKrsXJpk6wLpipKXFPFqrIngwDV4CCn6O /mKIS79fnJL9z8W9AnHDRUx/758tRH6NeoevGqiDFz/7SqFmf3p/yOPdoJHLTp+zT6nj 35lraeQF4Jx6wnTcrIMhLu6eYgldzDbknHzzb9IF5fUBHpW4lgR01utsxXy3ZcbjV+pf qUYuvK2sNFVuCeq7CmIY16flMla61PiHAYsGk2jxNlIVMHtxcZCIc1/uHEnUksf3oyNV 1srEzTTVN02V6jYFUW4spqiR1yGlKA4rAXfN/e38E+kh2XeBN8FZ/5NnsbdAsBPoMYA/ qAxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zrloeWXgUOLOMISBfKf4pjkEgrJ1tsN5/Rvv0yaa8aA=; fh=MjJjXoKL+44k3EwhasVTCw9xu4GGdb6XUjeode+tQoE=; b=CbZSzFWa4X1s6HTAsS7QhfD1axrK8ZZahcwnKA6PQrEXO4NETcK3LzZ6Ud3c0aLweT qZd3J1FNjQkDiifTEvWo6G/6wdcIMDs+DfqXViFbcN//5bz9oyEI7CWh6RfmwIJEVYNe fyiEh/4E13k6BzOXk8xYCJHqI+kPaIaBpHsgPsXN4EAMnAbnYnKFzuJ2srGrhbqCwBEe T1F0Pec9TQ52Ecgz7+fRSupVZ26qrvsVCy0kBXMJ/P6yVFTPzWMA7vZ9FdsXvyUZTT4g oOq9iFkywxtnbHDW8Tp+lbuiol3Au8G3jlvk4HJTINX78ZG1VHBgumSS5vNeUc9DuQEK 975w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fzafj7hM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id br37-20020a05620a462500b0078edc196108si7659572qkb.143.2024.04.16.06.55.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fzafj7hM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjGz-0005Ru-N1; Tue, 16 Apr 2024 09:54:57 -0400 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 1rwjGf-0004oS-6I for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:39 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGb-0001wJ-RD for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:35 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-516d756eb74so5371732e87.3 for ; Tue, 16 Apr 2024 06:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275672; x=1713880472; darn=nongnu.org; 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=zrloeWXgUOLOMISBfKf4pjkEgrJ1tsN5/Rvv0yaa8aA=; b=Fzafj7hMbLKlpjRfypiJcKv5gPj1AxjV/xBEtxUo/DSOldjWNKzm0DXgU1qPo/qnYW cG7PzFS7HbXWL1Qv1AZd/t1EYliBFJhEQz+rgP6Yo/q9VApondwWqFwmZZl6d2k/3t/T PwHgItfX0plm6Nib4/elGmBtFFI97uEK84/3aK9ge4oZDPQCA9I9jExXMVqkVbxshs5c 07Um0uwG1HIW9LCYChxs4osoB3jl1wEL3OAgtLVWkd3CwWYH8aHGac4/1hFSV2o+zVY+ 3hwQr37tl1dw5r2BPlwUJ4naBWpkjAYT/J/SucLwi2KiKTFL+gcFDQ2Q4ZEoi0x6hS3I RqHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275672; x=1713880472; 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=zrloeWXgUOLOMISBfKf4pjkEgrJ1tsN5/Rvv0yaa8aA=; b=aAYPaG6pJ8Y+bffY2ViDsa7q0W3QEvFoWv2s+Qi2GU1wYOEYFjQPlsGqS9vRSjZuyq JTh9wi8DYev0crFNh0Glh/xnepgri3xWVaabRWlCby3SYOzriyazMW4PAPOX/yBl0YSZ EN328GQVekyq91rr4qYutj9TmPupp5z5t4Fopk4vm5E19G/gB4qtbtCUm7eMLgYTB+Ik 7KbsqYmXArm6k8TUcqOrNY9XJ3c6PD1XGF/tP5MF9cSLVONti6WRvLtxCOYBhLKOdsbH UzAAqOkz25M2l/t7yht0fbCkGhetlaVrcJnMxJSk3kiem81kjriwq9F3gfROMa9loVrY m7qw== X-Gm-Message-State: AOJu0Yz2SfAnwlKISyT/RaCPU3xmMoMAuIOaITOz6s53M817UhgtpNN4 4c9QkM+t7zIA3nEJnhWTPvj+FmhwRG7Z1dgl3+BHbzPielmGwY7oIuzEP/r8Y5Wqg7FcxbRujME p X-Received: by 2002:a05:6512:694:b0:519:3243:3083 with SMTP id t20-20020a056512069400b0051932433083mr816018lfe.14.1713275671881; Tue, 16 Apr 2024 06:54:31 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id w17-20020a1709067c9100b00a4a396ba54asm6866832ejo.93.2024.04.16.06.54.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost , Xiao Guangrong Subject: [PATCH v3 15/22] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Tue, 16 Apr 2024 15:52:44 +0200 Message-ID: <20240416135252.8384-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-12-philmd@linaro.org> Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu --- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 ++++-------- hw/mem/pc-dimm.c | 2 +- hw/virtio/virtio-md-pci.c | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index e0571c8a31..c0a58087cc 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void); unsigned int memory_devices_get_reserved_memslots(void); bool memory_devices_memslot_auto_decision_active(void); void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp); + Error **errp); void memory_device_plug(MemoryDeviceState *md, MachineState *ms); void memory_device_unplug(MemoryDeviceState *md, MachineState *ms); uint64_t memory_device_get_region_size(const MemoryDeviceState *md, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9ba21b9967..633724f177 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1377,8 +1377,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, { /* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert(!dev->hotplugged); - memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e098585cda..a5f279adcc 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) } void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp) + Error **errp) { const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md); Error *local_err = NULL; @@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, return; } - if (legacy_align) { - align = *legacy_align; - } else { - if (mdc->get_min_alignment) { - align = mdc->get_min_alignment(md); - } - align = MAX(align, memory_region_get_alignment(mr)); + if (mdc->get_min_alignment) { + align = mdc->get_min_alignment(md); } + align = MAX(align, memory_region_get_alignment(mr)); addr = mdc->get_addr(md); addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align, memory_region_size(mr), &local_err); diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 836384a90f..27919ca45d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c index 62bfb7920b..9ec5067662 100644 --- a/hw/virtio/virtio-md-pci.c +++ b/hw/virtio/virtio-md-pci.c @@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp) * First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ - memory_device_pre_plug(md, ms, NULL, &local_err); + memory_device_pre_plug(md, ms, &local_err); if (!local_err && bus_handler) { hotplug_handler_pre_plug(bus_handler, dev, &local_err); } From patchwork Tue Apr 16 13:52:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789228 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp298093wrb; Tue, 16 Apr 2024 06:58:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsSMcgPun3McxF6YPzZSHTUOJRytBJLX1RLPnYk80Ax7aLaXPZxnIj9KW2LQvht268HZJGA+5irzhH+a9plC0a X-Google-Smtp-Source: AGHT+IHQ01kMWGdBczxk6lG/59p5GMxbwQxaz35dbrG8F3r57V9VYQ3jshWsV4hx0Srm1CSWhfiq X-Received: by 2002:a05:6122:7d1:b0:4d3:3446:6bc9 with SMTP id l17-20020a05612207d100b004d334466bc9mr10153837vkr.14.1713275896354; Tue, 16 Apr 2024 06:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275896; cv=none; d=google.com; s=arc-20160816; b=e5TEiI02Ml5nZHZirdXH+5qEF1RxHzZ3Lt+IJ0uH7hyma174TXtLXm2giSjkHX2HI1 Bg4eu0o0y4Zi2NPUcnJnNxKYudSTLz3hoMKpVJ2fXPM2q9cDL2NJ3oNTQW198+jj+hJt i058qT2B5yzZoVoviFd97isbsSsc/dTEss42z70BceLMLa9QwuE3OJEGQ1zEEFw2H2X8 LBwW3Qi5Hi6MIamOR0I5KjooFcobPeJUtRpZdk5Md7I46CdB0B2QJaZeob+YPlMJevr9 Pg6CPE9KSP5xXmyDiujIFKb9vakeDNgTbCJW3qe7rGjP+Iix4QSDEDvRVbRH90LLDzpF zp8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; fh=5haXPD3vE5WE9Of7Uj58emgiLhO4R0UBe5bivslROgs=; b=b5rvbdlz4CMPjzRHGvxzIOWE/8cIugmq6ARhety019971pMiCoWSzhdkx8gFDJ+DRu vUl41ycWlTykGlhBMjfIwjlVqU3DkyPsPnU1mDKJX9PqF3SOOEdNs3tOlGEbzXTbvCgW E1Yopbi7YfgpJlZ6kvnihUFhgF5qkUEMFR83dpwdGQojemsGXNEFxTXUhEht7/aqrpek YAhHisLOwL9Dd71nonm9DwFFz2L5tm18shEpuY9XTqDS5JDmwybichiS/W+nKWEKr5Rv jDez07q99uJXp9Zocz+QcX0yxR6N1cKNELwUnTLEQL/Cp+4MWIPOCjED2FldyIfgsjmf b+wQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jVJAIQRe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j13-20020a0cc34d000000b0069078004e85si12598825qvi.246.2024.04.16.06.58.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:58:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jVJAIQRe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjHa-0006JW-Ib; Tue, 16 Apr 2024 09:55:36 -0400 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 1rwjGs-0005JP-3B for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:54 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGo-0001y3-Ux for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:49 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-516d4d80d00so5428574e87.0 for ; Tue, 16 Apr 2024 06:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275684; x=1713880484; darn=nongnu.org; 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=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; b=jVJAIQRet1DAlNCVnKx+S2cu7Ogq7IoSqRO/N+uwUBQzRchLAwXunXSJNFyC25yuq2 KkiuiBToxogmvyYvLac3G3yQnFJlpBf1Sxc5vfzIDAbjmpK5Lnzra/H3SZQAGO2ot/2T hTAZ6Zekzd7jq3lyDaGzai+hED9SpALZykyaVfU7jetACkPGYrGGFikscaZb0QtCj8w3 Z4qOPTBoCprJZ8FiKCjkECnG1bAJntqi80dAvb30gHI1Urz00asHq1sfHU3tuC9HzQDZ kRbbWMWpYzLudJfNBr4PR7q46yp5iFBOLPjk5N+E5vh7KRRmvkqG4re/c2krvkl6aNh5 wnSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275684; x=1713880484; 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=zBppzEDS51MDAVFf+oWkcwnoJzt4m+loPuqdwyia2Jo=; b=iEL0mCdSmCiDBvv8d0CSlitUl5PmAju9tV5p0NlxfOktmMyke0U7Lxwsk4dwA3WhWS Yab711N5kASHJbeyLpTaF4oUIoDhwUj34CrGjxtpawjsREt/leZp58mgsdDPNUH2ThA8 WII5KiQY49PMcFaEmkIXDfKenFOOQ6Hab5bxXs1U9rpqJFMYXWaFK5UP0o8O7ze6JV6G dX+hcw7pINox9Y86MaeiMFMgj1135UpCkdtYAqFOoi6s/Uybr9+UFupmTXH4e54k9+SQ kztxOR/Q9B4lR+hTXuAXghB1VOKlcpwDMBADYmWpi88QwxF+hHjViItdp3hZisn5Wl2B 1LtQ== X-Gm-Message-State: AOJu0Yy6DM6bbyt3Mr4LZrTocRa+dbOZm94qHcJ0FQ22yu5+j8Q20dH+ vSjHefwppTFFKatuA7XdYeuoVT1777uGk4CgPCpmf7ZjVeMI2kvOCcZSQxYpSOc3YzIeI6pWXHZ f X-Received: by 2002:ac2:5e88:0:b0:515:c964:723f with SMTP id b8-20020ac25e88000000b00515c964723fmr8230098lfq.20.1713275684153; Tue, 16 Apr 2024 06:54:44 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id hz19-20020a1709072cf300b00a554a1c75cdsm302037ejc.172.2024.04.16.06.54.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 17/22] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Tue, 16 Apr 2024 15:52:46 +0200 Message-ID: <20240416135252.8384-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 10 ---------- hw/i386/pc.c | 1 - 3 files changed, 14 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index df97df6ca7..10a8ffa0de 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -124,9 +124,6 @@ struct PCMachineClass { /* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; - /* resizable acpi blob compat */ - bool resizable_acpi_blob; - /* * whether the machine type implements broken 32-bit address space bound * check for memory. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a6f8203460..ab2d4d8dcb 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2688,16 +2688,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * keep the table size stable for all (max_cpus, max_memory_slots) * combinations. */ - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 18bef7c85e..c4a7885a3b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1755,7 +1755,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; - pcmc->resizable_acpi_blob = true; x86mc->apic_xrupt_override = true; assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = pc_get_hotplug_handler; From patchwork Tue Apr 16 13:52:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789219 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297311wrb; Tue, 16 Apr 2024 06:56:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0/MqMd457adbOei8287i6aNRIbUTVGBf96y3mxpA9NUZl5Lruw6s8omBulLpOfd6hR4ugbb2HJKElbbzjSybm X-Google-Smtp-Source: AGHT+IFeVNVG1wX3VftE4P9C0cHXHrpx84IKZftAv5G2NHu5M6LOoEIRzmtwIb38h7hG3K3EAtW8 X-Received: by 2002:a05:690c:690b:b0:61a:c976:a485 with SMTP id if11-20020a05690c690b00b0061ac976a485mr7001434ywb.26.1713275779209; Tue, 16 Apr 2024 06:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275779; cv=none; d=google.com; s=arc-20160816; b=MJDsRj+rxzicw/MS/kUEh8gmTWTUGIwbhZYwCt9NnWLJZbEB8f4jOqlM+yV5+sWmvY 5Dl1l9EQVvIgsPnAwrhZDQRroodejnQYLnmgSDOyQ25oLfYrp1JisqdaWnpXU9yATOyD tQOfztQUfTrQrl+lf7fHTjAFdgAE2Ktyt/Rev285MdrG9623JfbxIIszQUTmQNIjgG1U nbFKPE5b4w/NFFs0FIW+cbPWHr7XMfy9+3vo57CAZFEAVUIqujz5DnnWLobd2l9zzon1 V7XqaWySVnx08FST5s0ewP1rJZvLYW5p7MQqpH67SGuPNqAS2QMpw0scXg7d/drinsSZ tQOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yRuCmU9cf0HsIcr2DFvli4GpYMIaf8UUti4fhCeSnNc=; fh=5haXPD3vE5WE9Of7Uj58emgiLhO4R0UBe5bivslROgs=; b=pjIXPbxkukZ2s141QcN8h/mWidb9znEsNqwkqVIB481BbrrGILzhEKWX0f4K+/S+39 Yt9aMYn4v6JkyfWZaATYKWa2OdWFNgJKg4dGJV8/v6hZCrTmgYUAxQAcXYNmK+k+6beN aIvBgn6HpNFCzQXAY5MnkeZKo2wuG0I2Q4IlnIyxVD+7JfbhVaoTyp/gz9Y4XWevpzJo mztTj44TI6MeS+Nv97riwGSFO/S8jktXnEqoaOGEAGSRh0ODRqVW9U4RytGv+A63yYad Nsc9uJcTFiSwl0ab1LG8SaQ+2WhP/qCaCFMOjA3ccHnlQuvcZGLjJSrZc4naDYxnw0AM Fg8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qezkKTuH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a6-20020a05620a438600b0078eddf7fa5dsi7620221qkp.769.2024.04.16.06.56.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qezkKTuH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjIE-0007FY-1Q; Tue, 16 Apr 2024 09:56:14 -0400 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 1rwjGz-0005WB-U7 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:59 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjGu-0001yt-Uz for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:54:55 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-34782453ffdso2549102f8f.1 for ; Tue, 16 Apr 2024 06:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275690; x=1713880490; darn=nongnu.org; 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=yRuCmU9cf0HsIcr2DFvli4GpYMIaf8UUti4fhCeSnNc=; b=qezkKTuHEPCFC4CgpalAcegtB7SbW5pAcgcGjdZ/q29HLN8mlpNuzNz68vzpkh42it JevJ8JN6lGh8pNt0tZ6QOImLSLXczRCcrZbTInfwMjHDEHYlP3QgB1ZbLiE7OT6L7TXQ 6RGGO7HsTqh/o72u31YETt9Te54oQ6yNVH41hbhX70t4zyB+sBhOAZFLT0kB8C2QM9O7 8UVNxUrsVbVWwRMmWy2VGIiMI5miH7WTp70wIHXLwfbWlvdHWOWEgWwpnvxS+A2xgO6y IjcIrOab0UQ3f1tIDQwKqETYMJAVE/sK2nwzC0A8JDWKHHzxZEz/bNEloWMiYW7iFLWh 8N2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275690; x=1713880490; 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=yRuCmU9cf0HsIcr2DFvli4GpYMIaf8UUti4fhCeSnNc=; b=FgCeQuy7W29pyexYJmiim8INZ/lfSKcSJUIww6K4Vunp7v6FdbAQWmA1zd+Om6Wb/9 SqJtQIQtQeFEWeFJVw/inUzMYcsFVoMxQH0be9JXsLReFD2cNPX17SrbQcMB6Xv8LFx7 1UPU/86PDj4EkEP15TZiLpIEBL94kTlOHcs5zfBlLcURQkZIkO9zF3xF8Zp45Dn2S6Ht oUGtV439DQxU+u6QdzAXYj/DRz6LhWD/DvUJBt+eyc5gg96ft3S3JLPw44GGJ8E5Dh7s rYIzfMf95wVjK8WoqvsFye2w6VmxgMlpdqL1Lt79gXt20oQtM40aTrkN4jYTVRIoONUs daAg== X-Gm-Message-State: AOJu0Yz83tS48nd01J1ctH/Gpf4b3oEDA3cwpIdK+uXPJHTB3Ng2XJc7 fxXWH8w6qJLTU8gJLKTA2lUJCt1Z1UF4FDf3eFJFJcWGLNxGQNR6FDjRIuBmSDnj75DK0+5KI/p g X-Received: by 2002:a05:6000:1d86:b0:347:e6ef:ea97 with SMTP id bk6-20020a0560001d8600b00347e6efea97mr4905335wrb.24.1713275690221; Tue, 16 Apr 2024 06:54:50 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id jw9-20020a170906e94900b00a52241b823esm6640542ejb.109.2024.04.16.06.54.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 18/22] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Tue, 16 Apr 2024 15:52:47 +0200 Message-ID: <20240416135252.8384-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::rsdp_in_ram was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_setup(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-15-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 35 ++++------------------------------- hw/i386/pc.c | 1 - 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 10a8ffa0de..96ccb4583f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -100,7 +100,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - bool rsdp_in_ram; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ab2d4d8dcb..ed0adb0e82 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2495,7 +2495,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; @@ -2667,16 +2666,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) .rsdt_tbl_offset = &rsdt, }; build_rsdp(tables->rsdp, tables->linker, &rsdp_data); - if (!pcmc->rsdp_in_ram) { - /* We used to allocate some extra space for RSDP revision 2 but - * only used the RSDP revision 0 space. The extra bytes were - * zeroed out and not used. - * Here we continue wasting those extra 16 bytes to make sure we - * don't break migration for machine types 2.2 and older due to - * RSDP blob size mismatch. - */ - build_append_int_noprefix(tables->rsdp, 0, 16); - } } /* We'll expose it all to Guest so we want to reduce @@ -2755,7 +2744,6 @@ static const VMStateDescription vmstate_acpi_build = { void acpi_setup(void) { PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(pcms); AcpiBuildTables tables; AcpiBuildState *build_state; @@ -2817,25 +2805,10 @@ void acpi_setup(void) tables.vmgenid); } - if (!pcmc->rsdp_in_ram) { - /* - * Keep for compatibility with old machine types. - * Though RSDP is small, its contents isn't immutable, so - * we'll update it along with the rest of tables on guest access. - */ - uint32_t rsdp_size = acpi_data_len(tables.rsdp); - - build_state->rsdp = g_memdup(tables.rsdp->data, rsdp_size); - fw_cfg_add_file_callback(x86ms->fw_cfg, ACPI_BUILD_RSDP_FILE, - acpi_build_update, NULL, build_state, - build_state->rsdp, rsdp_size, true); - build_state->rsdp_mr = NULL; - } else { - build_state->rsdp = NULL; - build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, - build_state, tables.rsdp, - ACPI_BUILD_RSDP_FILE); - } + build_state->rsdp = NULL; + build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, + build_state, tables.rsdp, + ACPI_BUILD_RSDP_FILE); qemu_register_reset(acpi_build_reset, build_state); acpi_build_reset(build_state); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c4a7885a3b..a1b0e94523 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1745,7 +1745,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; From patchwork Tue Apr 16 13:52:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789225 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297989wrb; Tue, 16 Apr 2024 06:58:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUKSI38cTZCU+ykEQgbCsfJg6Vjb9Ksl5ABdOP76emPJYjgR74K97bEMUY142LHRgaKDT/vzVYQl5eBvRkunCFV X-Google-Smtp-Source: AGHT+IGIqU1rUvFXBPyzkc8hAUC43FmC94XjmlS73R2xg2NyCkWv9i4Zw2L/t21eQh3Inm1nqcdl X-Received: by 2002:a05:622a:58f:b0:434:84dc:4593 with SMTP id c15-20020a05622a058f00b0043484dc4593mr15449724qtb.60.1713275881100; Tue, 16 Apr 2024 06:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275881; cv=none; d=google.com; s=arc-20160816; b=dtzLFYgOK3IvGK3IyRlQ6H4X7iTKz3m+GmykMzDo4hinIedHA9zCvzz5DpA1W39dyi XQG0113A6LgH9EuqPTCExJpWQE4FIdzGQMfAhGNHlH7vXMULHvyQs328OAgSTrkOiWJX P1RTOc908e2X4IrqME55SccJqVyP2tCriTHqqDuAYJrPo2I2KjuM7y7lgQqIgZ4t20KV eFbogfPTvZmdrFEzIMX60aMzr42i7OFVTeqv3p1Jm0iRMLaZSYWroCj+68hucuN3cImg IpVMzWmg8YG8Af7LXjJDeQIl5pUQUtVEAfLsApKQChZogXwCDgb8kCw0ES1wVxpvlwDW QeUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5Zw38H5IlW8RC6lHC20MJl65UFdMVvRtwGxRu2wIhD4=; fh=8a/KSKrN0m7aG1/xNcslk0oXaBVfGoSUqZaRA9zaCV4=; b=LNfckl2jCZYxljbgTExqUAWusPT3ByQ+zshO5qEGy6RCxOfFgNoJrj/q6b8YSrSUZW 4ie5yI/avFG/dWa1yvI8I9eyOBqoXFl9T7qeCVn7TM7b8hAfe5/E8Yotz9JfMzL1AxBI ao4GYD92tb5nQUF0u69sXYe3MGas3JRPSDpLyeU+rnLkWz7qrF3DX3ZZNViSJ1Bh31/b hleWD/lSqOqFWadnXhsxPMLHAd6dv/RXDKhOAXHjx7pXUl7w+z1meSpbw3PfoNxeo2Kb O4vNHQQhdRxuGyCtrtfskOB9W2+aZuzUZhhlpFlyIJFGfy1ebQJ0GAFY+j8ANvm29Evz a82g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PxhRr4iC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v21-20020a05622a131500b00434f6c1b3a2si12567811qtk.288.2024.04.16.06.58.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PxhRr4iC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjIB-00075C-6l; Tue, 16 Apr 2024 09:56:11 -0400 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 1rwjH7-0005l0-Ln for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:07 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjH1-0001zg-Nq for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:02 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5171a529224so5630341e87.0 for ; Tue, 16 Apr 2024 06:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275696; x=1713880496; darn=nongnu.org; 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=5Zw38H5IlW8RC6lHC20MJl65UFdMVvRtwGxRu2wIhD4=; b=PxhRr4iCISLrcqgw8DLTBp33WGvFgzyyLVFtOOpGn473GvhsaQ+SyBrCdvdGpfmJC7 9pARdrwCJnercwnrd1LK9qz5chqJ2Xwm1C5z6m8eAc6RCU3A0ipxq/LWAkNRd8N+ZmHL 0GnEVV9u37LtQjFSiYfTcbb1M34H9a6T1USiKZlvKC9lvVKWi9n350vTouF5zaP/5R4s mI/960rNFU58xE89aVezVqLxVvjrMy0xF6NY3sZaCeU472I423SB6L4aX6NUeepoa59u 4rPRwUjjtQ8v4mx3Wc42aO7f4emi+yv789Ggx+vX+oRKQijXnTYPAizgzi6SEFaD7Gdj MHJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275696; x=1713880496; 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=5Zw38H5IlW8RC6lHC20MJl65UFdMVvRtwGxRu2wIhD4=; b=Mu7s7jeNRfiiv1v00hH4b8/ubPT/6RDTP56e5RmEPe+nD86bIVmtUsT+b1gJxS9iO2 TZ59OHNiCXmUZTF/8w0lZNZObRzC/bdbU80+dRWR+DsniC0sT2XXgM9Olqq3kj3YtOI0 rUvycSJFztd2eJaweuKpCREXBKsufJOsdW1LBEqP2YUzAPO6lEfMpfLV2/Eqt8JUCgM9 yx/tlctN/wf5utvZWolRI9xEhGcQVYdiIx9YU+dqhIxdAqjX+BpPi+N64JRfPhynnrNG omZSm87dbbRsr7OWhI5r3N7VMwsIYNc2mZFywr8MBcQwpfwJbXMRvX9GW7sOrDK0FpJI /wYg== X-Gm-Message-State: AOJu0YxO4IkCpvX9JgGAr/CLIcP7haQr7B4Da6cC06ENuEC9Y9nCo0IA GsprQCpsCe63CoyScehVngbO1g9KVwdJPZKseDRYdavHzovCloGNPFgbWjZm5OnQz6WNvOd586C 5 X-Received: by 2002:a05:6512:3d1f:b0:516:d4c2:53f7 with SMTP id d31-20020a0565123d1f00b00516d4c253f7mr11213990lfv.47.1713275696382; Tue, 16 Apr 2024 06:54:56 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id p8-20020a05640210c800b005704825e8c3sm542692edu.27.2024.04.16.06.54.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:54:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v3 19/22] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Tue, 16 Apr 2024 15:52:48 +0200 Message-ID: <20240416135252.8384-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-16-philmd@linaro.org> Reviewed-by: Zhao Liu --- hw/i386/acpi-build.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ed0adb0e82..6f9925d176 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2459,7 +2459,6 @@ struct AcpiBuildState { MemoryRegion *table_mr; /* Is table patched? */ uint8_t patched; - void *rsdp; MemoryRegion *rsdp_mr; MemoryRegion *linker_mr; } AcpiBuildState; @@ -2715,11 +2714,7 @@ static void acpi_build_update(void *build_opaque) acpi_ram_update(build_state->table_mr, tables.table_data); - if (build_state->rsdp) { - memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp)); - } else { - acpi_ram_update(build_state->rsdp_mr, tables.rsdp); - } + acpi_ram_update(build_state->rsdp_mr, tables.rsdp); acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob); acpi_build_tables_cleanup(&tables, true); @@ -2805,7 +2800,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp = NULL; build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, build_state, tables.rsdp, ACPI_BUILD_RSDP_FILE); From patchwork Tue Apr 16 13:52:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789221 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297679wrb; Tue, 16 Apr 2024 06:57:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVioh3s2yndnNdK0JjrPfpu2d0+37pMf+mNjnYk63WiWa12fM1x4qqaABMm9AHcJVQ4gBlnwvLGb3VZkB4QN1iv X-Google-Smtp-Source: AGHT+IHoY07NBHLRVxDFxeE8fAfpr40pqpYrY/Kj7MQa+8/k9hxYiJJ/QZnt4pXrgc+0BUu7X5o7 X-Received: by 2002:a0c:fec6:0:b0:69b:7c49:1f92 with SMTP id z6-20020a0cfec6000000b0069b7c491f92mr5170699qvs.59.1713275833167; Tue, 16 Apr 2024 06:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275833; cv=none; d=google.com; s=arc-20160816; b=gszUEn6dkgwAKeJg7feK5tL7xu5UHzgh5A2aDitZBZ2xGQgcnj/6JLQIzxNqqC5v5b AMZnEdwE/P8wloXavykZXxqZXRWtnywLDnj7S3tPku3Vw/m1DisEc17qEMYBgRze4JGP JkuQE+udRRPNJJgG0pGmXWISk1jchchoIOqRBnUVkbDqdUH4KOWZtbxqYIgwK5hr1E39 1G8LoYQf7JDzxOH4S+5u65e85EApxDvOpo3zouzrs286SOjJYAnHy7JvrahMNjHZ7DbT u1MgRkTpXFfiY/Pvl5ie+/xbUcqcmTSW9kIJ2h2JO3H5V9Ae1G136AGaEJnzgA221ZVV rDsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=InHVIOXJbG3Hhpm39Dzz+hbQYreWyQMymeus6OfTCNQ=; fh=5OCUA+doqgtSVf9yWNZ10wRW83EIHMMcZo9SVcrtVkA=; b=zIFAn60zsSkTXLbgJNdav6bqZt8AZWfAk3eYGFWUXBjumywbBx9nGE+viWMPsfDGUQ 9HNaf3FyWn04hM3tbs8S/Mtkw4NBkTXkMPnUALKIJaokZ5gu70f2iEonQtBKMv3SgLpE Yy/r1XnYKuepfWXNrJEwsXAgXlmeJbbI7knymRnyVmS9xCahKVvE6iNAmAAXFjvTt2rv K/ivLLaL5y/nRl9Pu7+3BQXfzE1DI1vCHV6QjIcAtBzO29jB8evTP7MTHfICkUIf/Las EWzalJpTFc2M5KGLhk4soblVW7bju1KohJlIpVLvYfIibwi4ZhXz/ktaNMsjR0bqbvkv 4O3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rx9FQfgt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dm16-20020ad44e30000000b0069c9ea3e7f5si2279944qvb.325.2024.04.16.06.57.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rx9FQfgt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjIJ-0007VG-AH; Tue, 16 Apr 2024 09:56:19 -0400 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 1rwjHB-0005wK-7I for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:12 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjH7-00023I-Ar for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:08 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a4702457ccbso556078066b.3 for ; Tue, 16 Apr 2024 06:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275703; x=1713880503; darn=nongnu.org; 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=InHVIOXJbG3Hhpm39Dzz+hbQYreWyQMymeus6OfTCNQ=; b=rx9FQfgtd4JiEcLdQHsq1a3A5xDC20cAGXXm5ec4pBFj/1+zAWLmXNrQFvKgCY9VSR V5pgo9ePtX/MaD/D8o49ac5iElONXq3Z4JpEiG8wy1Pl66AMLr8TpMNtfON4c3Npo/sV 5AgVcWxOHINtscgZIB3wA944RxtQb08+hEzFYdiWbr0DiaX8a4yWEveVfLX3H0ZDDk21 VdpMY0H4/4Qv0tzJgCzVU+//jG3jvaqVoMgZY+42TFZ3ICxQbj4V4U1FU+pTvQ9RUc0i dbucR3odnUQyUl2jYu7KzoM2DXPaU15igvkF7UwZ5ZHFKXnEilgShB2bq/WRt1L0icDb 4ivw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275703; x=1713880503; 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=InHVIOXJbG3Hhpm39Dzz+hbQYreWyQMymeus6OfTCNQ=; b=GOns/51/IsCIwoyCYHc0d9p/dunrLEQ25Fq6+uzhIMiQylNR1IIekHUKabAt2yWEBc 2RbZ3E1dGwibvdkOIg0T/KUv610qrrarCfxJBiDME5L3+/384qik9djo+FyutFjQeQjp FXs302sifD3629WcGx+zuOygHZBfEpJtiw864rJ3qxlZAM67YYvEG604fM5+LsBFkwWP rhI9dSve27fI6wHMGr3C7F3lMr11cqvF7BoAWtRjfMb0uRWQQgcufg16Yy07M7KqMRZi aRksatccaD5rIR9CvFzeBLfrpbiMAsK8j+7VqJDL/qMAC9vNFpFiRHVIe44LjRjhJcpj ryrA== X-Gm-Message-State: AOJu0Yx3i31NBHVM+Cbb1VAE4v3ppi3N/0w1dtd96ZsRWdjN0ABdfe4v Z2vgVgxl93kLPiaBetpWki3mhySjvy6lQYNQTP5/g8TA6DrZXfn2H7HsZ8QVBom8TXF9QMBOjO2 U X-Received: by 2002:a17:906:68d3:b0:a51:cdb6:fb1b with SMTP id y19-20020a17090668d300b00a51cdb6fb1bmr6991946ejr.28.1713275702812; Tue, 16 Apr 2024 06:55:02 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id gs39-20020a1709072d2700b00a46f95f5849sm6868374ejc.106.2024.04.16.06.55.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:55:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v3 20/22] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Date: Tue, 16 Apr 2024 15:52:49 +0200 Message-ID: <20240416135252.8384-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- docs/about/deprecated.rst | 4 ++-- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 19 ------------------- 4 files changed, 3 insertions(+), 47 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 707455c817..22335ef6b0 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -219,8 +219,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 4664974a8b..0caa6a63e4 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a1b0e94523..2e2146f42b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,31 +256,6 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - { TYPE_X86_CPU, "arat", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" }, - { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" }, - { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" }, - { "n270" "-" TYPE_X86_CPU, "min-level", "5" }, - { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" }, - { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, -}; -const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d32acb5634..de56226839 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). */ -static void pc_compat_2_3_fn(MachineState *machine) -{ - X86MachineState *x86ms = X86_MACHINE(machine); - if (kvm_enabled()) { - x86ms->smm = ON_OFF_AUTO_OFF; - } -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -812,17 +804,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, pc_i440fx_2_4_machine_options) -static void pc_i440fx_2_3_machine_options(MachineClass *m) -{ - pc_i440fx_2_4_machine_options(m); - m->hw_version = "2.3.0"; - compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len); - compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len); -} - -DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Apr 16 13:52:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789223 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp297847wrb; Tue, 16 Apr 2024 06:57:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU8UJPSW4X3vVm0TDx4+o0cI8QXcsUvO3xhV7wEJY3n0Pm3hOg2eAqXBTjACxxFf8Q/JaJjpvad9PS+TQdOK5tT X-Google-Smtp-Source: AGHT+IEMYRspr+ISNhihSscNkcAuOwYiCaZ9ccvQ0b4750YRcHwZ10/Pdki5XVDq1IfvM2Dv4ZmY X-Received: by 2002:a05:620a:208c:b0:78d:699b:2893 with SMTP id e12-20020a05620a208c00b0078d699b2893mr14454874qka.23.1713275857527; Tue, 16 Apr 2024 06:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275857; cv=none; d=google.com; s=arc-20160816; b=NGLpk/TqwVzzcjUBFtPgrUYw6nGUhDLEySNEm2+PLz95as0orTfpEQbpQ/IwLogu/V KD5POtOJwF0JYzSusjQYW263MFMkyJkF/9gyNjWtjOFfsvclNGb1ilSS+0mtdlK77fqt dvDUL//oe+LXWRGqcV3YFUjqwYJDOphdfIJniJGCfH7Uz4t0m2I3wQTZ+ZU3pql1pbZp SdIzDKgEMd7GhWlpZIdtpooci+VhVPY2UCoIgZn2fvaiv6dtqHIsqk0ejfErMKvN0vBi J5a+I5lFiOm1BOApw4QLNsi1oIHDKrVbRWt+cQfNFcqyYcFYt9LJOfYvF9D5hOcdXm2J pnqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; fh=CCdbmkzWzmJu9fiQGgKBS6VV2V2cG5HysLz/PiH7qKs=; b=S0AtsPWuV5sppBVOzjWXUk6hTr61mf5nk4/otTDm2UeGNxvENfGkkRVSdlsuX5rE3p vZ3gOWSy9cj4Vb0Ni5iwBnUJsBxRBDhWk4roNP+oGURPL8ic9E9IUrD22pd5CDmS3is1 dv/yG7QurUtyBkcFNMrNq+vAgKeREkfrAx4rIstT3mMKG3d5CaZhxODG7Dz35GkRNj8S gS3p2P46Lak6SZ5Xrnq/yubaCRXkSLQEGKrtM/zVv1MqzUhuTLawUvEhqW6lOgQkzvDK UWX7tiyp+1T2vb9k+TutCGOwHhmnIFld64Ue+EbK2cHhKcTmb430sMAvYtcN4ddqtcqW 6HPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UfOJuBTE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dw26-20020a05620a601a00b0078d693001b5si13502609qkb.314.2024.04.16.06.57.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UfOJuBTE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjIQ-0008Gs-SY; Tue, 16 Apr 2024 09:56:27 -0400 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 1rwjHG-00065V-DY for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:16 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjHC-0002Cx-LN for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:13 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-56e346224bdso3777816a12.1 for ; Tue, 16 Apr 2024 06:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275709; x=1713880509; darn=nongnu.org; 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=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; b=UfOJuBTEmzzhiXiiMy6oGIOkg9WNGBqsbQLSURQyR2GMU8WsPQIZYnu21l7kgIBv2F rJSseFWHiM9TvxECMSF/ab6JW8KTRVkG+q81JDfj0ij5eEddQaBeyo2uR0KCNEKsaiWt FcGBpgFYq2KizZPWTXJ6b3UO7u4gqKihJLWqAc+/rBOZaS01vjDWoeCrous1+E309bfI ykqqsWVPk1IVXyw5pGjpW18NCB2olVjFhOoRIYtbFi1Hci4jGTdzkWbXbEyLEoBOSAlx MQP2Ksgvgme1+WZgOaHJNv/y9TcqsgSGFNfGvHquttzypbTldb1t3ouNZ9n0sW1lfkQF q4oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275709; x=1713880509; 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=h1653K/UfEWnXUTbr/YeJw2UmUosHHOUFfds+vppZrE=; b=UDBCLEijM8QfEvHuIrPEsFrZgrNAdjeSFd4g8uEf0WKNzj2kRChvS8aIBjpGAosEAP F1G9Qhz52yL90RjeQLsHVwSvbXBBKvLVcfZuPGPhlJy7CMb680NH/yWDOuFz5bZPt7TA ZJ7XpIfby5Jdo61/DJWH9VYjWdlo+iFTMpUvLP+4Oi0F9saw1Z/immqEgki2bWfCq36d HlRllZgS3+PwjGmvwVLCAKQ5dqiyEH/uKVS5lFERb8bllB5BCiL/KrUT6S8rmKvRrVFN gAjFr2/TAuTUs+HYPKC+XwL9O+Gtr1PB3Gz/xSKGBapkTHMRtaCShWU7T7+uBHFnWTkl POMQ== X-Gm-Message-State: AOJu0YwImWi+Siop3JqZ2ZYU316mk18j+NoIhuw0qLFvAgI01YHAQcHy uAaVLR7ctrL6N6Uj3LxHjUY0NkgQ87/pvHox3amh/BkTZFasChgj0kJ2/wQ8nhXc1pEIH/BM9tR 9 X-Received: by 2002:a50:8ace:0:b0:568:d5e7:37a1 with SMTP id k14-20020a508ace000000b00568d5e737a1mr8273701edk.36.1713275708861; Tue, 16 Apr 2024 06:55:08 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id bl19-20020a056402211300b0056e064a6d2dsm6108679edb.2.2024.04.16.06.55.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:55:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCH v3 21/22] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Tue, 16 Apr 2024 15:52:50 +0200 Message-ID: <20240416135252.8384-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X86CPU::kvm_no_smi_migration was only used by the pc-i440fx-2.3 machine, which got removed. Remove it and simplify kvm_put_vcpu_events(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 6b05738079..5b016d6667 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2018,9 +2018,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 33760a2ee1..f9991e7398 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7905,8 +7905,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index e68cbe9293..88f4a7da33 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4337,6 +4337,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; if (has_msr_smbase) { + events.flags |= KVM_VCPUEVENT_VALID_SMM; events.smi.smm = !!(env->hflags & HF_SMM_MASK); events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK); if (kvm_irqchip_in_kernel()) { @@ -4351,12 +4352,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending = 0; events.smi.latched_init = 0; } - /* Stop SMI delivery on old machine types to avoid a reboot - * on an inward migration of an old VM. - */ - if (!cpu->kvm_no_smi_migration) { - events.flags |= KVM_VCPUEVENT_VALID_SMM; - } } if (level >= KVM_PUT_RESET_STATE) { From patchwork Tue Apr 16 13:52:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789226 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:dcf:b0:346:15ad:a2a with SMTP id dw15csp298079wrb; Tue, 16 Apr 2024 06:58:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3H93cM86osURhIroyY4ZceGQHvDDVgdAWIgP42Uf1YOdigsG7zjefci0bT1u9l07N1yXCeyLHtlMsP7bj+BMt X-Google-Smtp-Source: AGHT+IEW8cSPPTi4YZ/ewwsBLUywRz7gdX95bY/Hoa3qHaASpkJ24IPmYdKlpmQeMYLrZof3MXic X-Received: by 2002:a05:6358:7d0c:b0:181:6575:1b23 with SMTP id i12-20020a0563587d0c00b0018165751b23mr13847531rwg.5.1713275894676; Tue, 16 Apr 2024 06:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713275894; cv=none; d=google.com; s=arc-20160816; b=VlhbcVergfpYId9rBudVuTgIK/lE7zI9elc+vo5pOLSLTMBcMLVYSGXkwuiaXvhfJG 7jeurSSGyctUyaGrq/3vwlxms/PSntVOnBVjAP0oKH7dpBVcd7gilK6+6uKl3PMep2yM dNo6QJrKx6iiVlL5dNegFKZP4q2GwLI8b2hKH3dAfv5wGmYoPqV48qFXBdNdiAcmeS9o GloHv8wzMmKJayUTYERg5FjZiXlHwgTOTuoxf9/Wi2h/NKy+v+4mba89pmn/t9HKOjZ9 P2YJLOprrBpoPcKqGrHccCef7ROKJNu9BwrvNeLR/8HCCnAM7EdJhCU/p+pu7fDdilNz 5OBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FmoKGcuQgIbaL+xuAzdxXsXrBiVUMbQQjbVksVReO6M=; fh=5haXPD3vE5WE9Of7Uj58emgiLhO4R0UBe5bivslROgs=; b=aEDP1U8rSL+yYzH7UvfLsKprZs7AyRSlwim/j/ybAzIYRWwZMWnrWgDozPi6CnXRI0 R/et/CTGfq3OhMwrIokoxsAuR5uFN6JkTw6VCVh5yTDzXhFaX4g+xmVsEqBMQwJy7OdH IKG4QX+o5kuTJyg85OQIVTpkDO6aOwMPpHBkvPxWXqh6DtnTinvwXF0ri1m/gBZD6bgh G5HPdm9pKQu+VIKT/vQ3nj6QZvt1UcdXYNpCpaS2Q+ibiSO7UcwjZhQmCN7Hbx/UBUCy nBte8BOQELrQxJ21dZMANgou9sjISNXHLRkkgTQXV0sVkJQoTTg7x+AYzuDCt26uLeSl PXzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DXOjJhV6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bb6-20020a05622a1b0600b00436b1b1ec55si8816828qtb.53.2024.04.16.06.58.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2024 06:58:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DXOjJhV6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjIQ-0008Dd-MF; Tue, 16 Apr 2024 09:56:26 -0400 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 1rwjHN-0006IV-JJ for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:24 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjHK-0002Dv-F9 for qemu-devel@nongnu.org; Tue, 16 Apr 2024 09:55:21 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-518a56cdbcfso4985677e87.2 for ; Tue, 16 Apr 2024 06:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713275715; x=1713880515; darn=nongnu.org; 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=FmoKGcuQgIbaL+xuAzdxXsXrBiVUMbQQjbVksVReO6M=; b=DXOjJhV6Btkm667Ugn/esoColhPCbFGtTezDXogtEvZePDm+aRd9LGR1PJUaT9rqNr Xj9awmvfJA/RXrn/gH4KPUwLZjq+49MB3ChXVVvwgQ6P4qQM+ZQMpyDQnVhHNdF6TVDG lmKtWPj82zutWNvUh/U4cvGx+ntl6OMLUDVWm+fUBMzSqQOMHs+bYeg46jRNdaU61vYd OzLxS1ZT+Z5fhKHnCxLi+F7i7qKElPH1wPgLJiwPfH9Qieo+A8jVQukbsDO4OQdggMvO bHLvDScZzN82ABAaDdnXlcbRYNYi2HJXBrqwaT8hcySmzy/YkkV2DmUrLNGZ4q80/I3O g20w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275715; x=1713880515; 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=FmoKGcuQgIbaL+xuAzdxXsXrBiVUMbQQjbVksVReO6M=; b=oHimOzWg1BxUkQGilIrkM/kE3WzDxu/XXpkMqD8zRHjqAEi4u+BntUH73u7QsstZKI Ygzhr4PKayCEy9ObcLt6vToFImNHU1iSh+33qedEZKVq5MYp2PWpavLNN4RuV8/898B4 PqL7sglekdAUsX86UaNEP104YNkXRycAw59QTJEkIuHMrBJmjaR5aRe4gaZgKSSm98PR r+L1Hc8ak5Ax5mfRY2ltAYY2g0lpE9mykn33BMuqyBFlsJdCidWpcWqzIMCqr2RCyA3+ ER8h6Y+N1OcE754dT26WEcqAQwNQs80GWiUU8IgJgFYm7xyJ9tMBKNmp0DNLswOHtXva MFrw== X-Gm-Message-State: AOJu0YxLbF8MVg1ke3xqFkGbfJ2iRogQ/GRTkj95OJxTyfuUj/0hkFGo jGjVbCc85c/JHAg8maj9DNZZPTurrld517EedOZWb/s0jeJnazkI+89rO9HfQSJwzWH3w2t7OOL V X-Received: by 2002:a19:9112:0:b0:516:9f03:6a92 with SMTP id t18-20020a199112000000b005169f036a92mr9651710lfd.43.1713275715096; Tue, 16 Apr 2024 06:55:15 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.61]) by smtp.gmail.com with ESMTPSA id be1-20020a1709070a4100b00a526e6f5cbdsm2383282ejc.47.2024.04.16.06.55.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Apr 2024 06:55:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Ani Sinha , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Zhao Liu , David Hildenbrand , Paolo Bonzini , Igor Mammedov , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 22/22] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Tue, 16 Apr 2024 15:52:51 +0200 Message-ID: <20240416135252.8384-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240416135252.8384-1-philmd@linaro.org> References: <20240416135252.8384-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition (local to hw/i386/pc.c, since not used elsewhere). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240305134221.30924-19-philmd@linaro.org> Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 96ccb4583f..0ad971782c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,9 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @acpi_data_size: Size of the chunk of memory at the top of RAM - * for the BIOS ACPI tables and other BIOS - * datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This @@ -100,7 +97,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - unsigned acpi_data_size; int pci_root_uid; /* SMBIOS compat: */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2e2146f42b..0be8f08c47 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,6 +256,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_ACPI_DATA_SIZE: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_ACPI_DATA_SIZE (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -634,8 +644,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") || @@ -969,8 +978,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); } for (i = 0; i < nb_option_roms; i++) { @@ -1724,9 +1732,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true;