From patchwork Wed May 29 05:15:17 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: 13677828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A33B1C25B7E for ; Wed, 29 May 2024 05:17:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfG-0000Hu-04; Wed, 29 May 2024 01:15: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 1sCBfE-0000HT-7A for qemu-devel@nongnu.org; Wed, 29 May 2024 01:15:52 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfB-0005Oi-R7 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:15:51 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-354c5b7fafaso1358586f8f.3 for ; Tue, 28 May 2024 22:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959747; x=1717564547; 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=z0RstI2ICQ48tpfxpm9VnXDf4J/IC9DIhxR/LxuqMVM=; b=dcMG9StpP6bqiiVZkfW6cFt9GugQyg6XK40RyQgcYFgTI3DUOnHQBykzP70t3DL5VZ TCdUHZBQFQNb3TmcWv/A4f29nF0sl2P2GisXUWXA5uvjZhvahftHWCrFn4/rhlxQ/DFK +AKn3cfGgIk2lwSYeqAh+uc78IQrLSoTVoOqAvxN8F4Aj1BizVSbCjRk+ihnTeDedBIg qyT2NGknYGBHeyTYk8eomKnIstmxo2WBlRTCKWGRE9D8gFOltODJ59X8uCrYd0hYI6sG +5n7ALqzSts//fl4nsXSGX2xLLVTZoBSxaN9tcKffMdWJMP54HXCy8yA3OeOv/X7TLJb N0KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959747; x=1717564547; 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=z0RstI2ICQ48tpfxpm9VnXDf4J/IC9DIhxR/LxuqMVM=; b=F1spbYZb0Pv0g3G2vF3Z66Q5Vc/soH2/3pQXk4hRblOI3WYxnd4cxD1DvOXuX+FkH9 npoVy4JOrKiA2lFGxVq69EnHGndulxJr32HgtXWS2X4okVq6pdryRegNnBwmw3D1/aqx ZJQECo1/CGmtmLZqZ49y5tZoRDjgZb6zd6KFpOk34fv2JEGX5s7+NjcjuXYXtFndEYgA g0NzDwLSWkUY1PnAgb3rJMXKWeijYY/ctSMKswovsuIYRGMB2vtwopUo1sK0YNaAgu3i mymFF7xB7gLaFV2roZnIhDXrpkwKPzVmh+ythvd+XWNp8FDEii6atW8Rh6u79z7YpK9i Z57Q== X-Gm-Message-State: AOJu0YyFTE+wl0umdN1xQP/FncDnHIP1qVodMMlRuFy0+l5lYM0b1hZx TDVbRM2DI5NDHarCfvekzYKwa/4FBul1MV1IRb+SEcy90vQuXO/tND2b6x9fTQGAeHmz8RNbYqh b X-Google-Smtp-Source: AGHT+IGQCdV5JgTtxsJqMalBsUI/5BYosFu1SFbKV8PngGRPz7N8etjGhzYITVORAB4TD8ku/EnBYg== X-Received: by 2002:adf:f1c9:0:b0:351:c934:e9e6 with SMTP id ffacd0b85a97d-3552fdfa7a8mr9503971f8f.64.1716959747484; Tue, 28 May 2024 22:15:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a08acb4sm13592020f8f.38.2024.05.28.22.15.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:15:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 01/23] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Date: Wed, 29 May 2024 07:15:17 +0200 Message-ID: <20240529051539.71210-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Similarly to the commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated", deprecate the 2.4 to 2.12 machines. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- docs/about/deprecated.rst | 4 ++-- hw/i386/pc_piix.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 40585ca7d5..7ff52bdd8e 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -228,8 +228,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.0`` up to ``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (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/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ebb51de380..02878060d0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -742,6 +742,7 @@ DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL, static void pc_i440fx_2_12_machine_options(MachineClass *m) { pc_i440fx_3_0_machine_options(m); + m->deprecation_reason = "old and unattended - use a newer version instead"; compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len); compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } @@ -847,7 +848,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) { pc_i440fx_2_4_machine_options(m); m->hw_version = "2.3.0"; - m->deprecation_reason = "old and unattended - use a newer version instead"; 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); } From patchwork Wed May 29 05:15:18 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: 13677838 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0E66C25B7C for ; Wed, 29 May 2024 05:19:39 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfM-0000JH-1O; Wed, 29 May 2024 01:16: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 1sCBfI-0000Ih-Qi for qemu-devel@nongnu.org; Wed, 29 May 2024 01:15:57 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfG-0005P3-LQ for qemu-devel@nongnu.org; Wed, 29 May 2024 01:15:56 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42108856c33so2343325e9.1 for ; Tue, 28 May 2024 22:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959753; x=1717564553; 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=G/SJFBZre/GEfWkNyTOjC9/qM0jdeQJ921Sth1mwl3A=; b=B9NkxfHMz3C/WGB5MvsriJmtn8NJLkLpUT/aK1UySyB6iV5SKeju60eoFp5N/yjUs0 ADgCQQK2leSV7jzgVuKiDHDSdCEDwyULjogsopGcJKF+gqntT68AFqtZrDMsxXOEOVbd cahUUDFinVVahJmZp9s7kn26tmCrnDsQ3S919qj9NBQHKXU1qGhhRWkP90m+QQ7M47od G9EXVK3lV+6SYgw1oYUY96pMT9AvSXrfnk6t5SA/tdq7DHnfov93S42CXLXB5Gav2Kmv Go1r6InABg5e4fFSGLgXFp5H/+rgMhYm5/3sndsjEamEl9uRLctoL2cDS7d1GcgV1ahk 98ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959753; x=1717564553; 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=G/SJFBZre/GEfWkNyTOjC9/qM0jdeQJ921Sth1mwl3A=; b=GwtkG88hP3GBsoh9KxA1rHotvXUfufiasoGDBtFD/1keVIoTukFDuiMJFbtmeSklSE vnSZ0m84gv9Y+KE8/aiyx8K1R9ozn/pF5p6JACqKAqWHVNqfnTiS51YXqNNSVVmc6+43 Z62ewa0hcaclTblXxKyqf1X0j1Mn/J7lnFi0mvk0215rp5+3mIufRkQbJM5+G0AxEppj pjfDE0bLjMxRyODeeL9OuMby8JVSDmReCJuwijQnGWCYpgCcIpkw92xaU7/ALeCN0P39 uWQKgVF0RL+EXRv9LgdITrIg+Qgs2iS1eC0BLWIlw/G6ojZkxVf2AgLai1Gn83ZLSOtW QrzA== X-Gm-Message-State: AOJu0YxBIG0aB4y91pNb+kMv4OrLp1AHU6885XPWqglWnvpA4IQNNPyc 5oPNTaChx7D9xTUxr3YYOwRxz3ggFSd93RVBGYTnKKdI34e7RzoVpbgDmAJvaeK2fhA6wvI9EVX Z X-Google-Smtp-Source: AGHT+IH0Mq6gbJbZbfQHlWb/QZ49KR3Qq2l2IVzwcrIWXga+M5ZzmTX2IfKYv//NUw2KLE13kjisCQ== X-Received: by 2002:adf:f6cd:0:b0:354:fce5:4cc3 with SMTP id ffacd0b85a97d-35c7a8477f9mr669026f8f.19.1716959752806; Tue, 28 May 2024 22:15:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a08aba8sm13590837f8f.42.2024.05.28.22.15.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:15:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 02/23] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Date: Wed, 29 May 2024 07:15:18 +0200 Message-ID: <20240529051539.71210-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 7ff52bdd8e..629f6a1566 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -228,7 +228,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.12`` (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.12`` (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 fba0cfb0b0..5f0c2d8ec2 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -925,7 +925,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 ad9c3d9ba8..7347636d47 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -290,9 +290,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 7b638da7aa..11182e09ce 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -319,21 +319,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 02878060d0..a750a0e6ab 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) { @@ -887,38 +882,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 Wed May 29 05:15:19 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: 13677843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 139FAC25B75 for ; Wed, 29 May 2024 05:20:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfQ-0000Jx-7E; Wed, 29 May 2024 01:16:04 -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 1sCBfO-0000JZ-5x for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:02 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfM-0005PO-Be for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:01 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2e73359b900so16834411fa.2 for ; Tue, 28 May 2024 22:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959758; x=1717564558; 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=ZQFBUyet99nnl0AvXzE5U+kX+n+Z7IJDe05vXl2fnXRKI1lGdEfH/UJ5ftTMl0+a0i /S53VnzOZLs7xS0cSZdVSaq9pWVw7bseaapn49C/dXVrRv9PZGV7YyWUtbRl149J0pKo FzUur04Wg0pL/HVWebQyVglHtYPkh6tlBWS2TPhc4v97fMhy47dfbQmMvBh/wn0XTc+o YrPbtPJbt4DCEqRV5DBDz96dRSF0EmIt46VQugplN2WRgasXRQHIOTuS/HjtcgkrYTcE s2Grd66fp7VgXjREMfXQv6Ng9uQdITLIqzsNiADAJ+FYFIkpwKeRpcQENqVauPc+Fs6h CGPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959758; x=1717564558; 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=fdBMFzu4hqBIvfMZCYEL9zT9nqTt+LjkCFlEJCRuY7dLzKbVsnggHbq0N3hbeGrfPL NAvja1xe0caB7xC18bi+5VubVZ45+ARF4DpKN5IdV9AgMeoqmDMk/fgyugnCC7xHdGqG 7XN3wC/LXVTaEFgxyNgUxw5f+Z4nr3mzRyJsaFK42Qep+MI4VvdpU2d74k9C1FUyVWgm zj1mI3SMSHwWMo92dLiKkj6EaGBrpvDD63G5+0xWiIc2U2HaovjDlW6XAecId4vJ5c1c ELZsYJUbiDn8Yc8B4YKMD1CZq5HqWAq5PB8QmnTVx0YEnAeUoVPXHvuQDOtF3tmkwWDJ gJPQ== X-Gm-Message-State: AOJu0YyFtYwleaae7Ine2oQc1UXVPo4KJELV1A+183qCADgGGn1mIzsp lRZG6/cL2s1gitimzdys8O/N72LrRczyMJ4lJXBdyNSJt4l6zg5lfL2xjDpPvfuHE3tA6j2rHED x X-Google-Smtp-Source: AGHT+IEOhvz1MTE9Y/IMmU6g91ZbFFla2DYPtgXs+FkuMaVVZ7Hn9IKPA/QYBwHY3Zt36SDHDKH8RQ== X-Received: by 2002:a2e:8793:0:b0:2ea:7d47:82a3 with SMTP id 38308e7fff4ca-2ea7d47846emr2118261fa.37.1716959758147; Tue, 28 May 2024 22:15:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c9363sm13705594f8f.72.2024.05.28.22.15.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:15:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 03/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Wed, 29 May 2024 07:15:19 +0200 Message-ID: <20240529051539.71210-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15:20 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: 13677822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB422C41513 for ; Wed, 29 May 2024 05:17:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfW-0000LS-1n; Wed, 29 May 2024 01:16:10 -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 1sCBfU-0000Kg-Dt for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:08 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfS-0005Pw-5Q for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:07 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-354df3ee1a9so1536386f8f.1 for ; Tue, 28 May 2024 22:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959763; x=1717564563; 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=bPOc4D2WqTK++5W9NHl62RnHrlfVQ+DAk/fr7iPa5hYz6i7/RJlNh+/juM3rz6dwHe olNhmrEdSCr7WW74pDQyFGDsB7gKgdqJ7IBG25TGcpq9pg7yV3g/zimi1fH6syR91aAs 4ixcrVmwCtg7yumNT16PMyAgVNAAk5KNZsx9WHdE/mLTn+JEUgNMQ4yXTseM4DWmr9Rp MdBaucsNKkhimUB2zTr+qfK6fxcra+PT88PPGJtWEKX8LtIZyTRI5X/shJYOH217HRH0 z2vkuJkcgXOV+uDeaCbyn/I3iMbLIFJNtvRL209RL2/kJirZEhbnK6oV0RbK+EJX1ryp mhwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959763; x=1717564563; 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=BfikjJhf4d8bqQrBKi0hxmf89X4itwcZoo/2Ouj6yPSR/UyHFdSkHqMHGzovsjVYyE vMxN+95Gofg3qvD99/buqa6q/P0pY9YrkhWOojlWqynA5jpU8AlgbSP0KaFyw5G2prcB 9aZu1SOg6qLRDKTJnTFNLbkIbbnr8HDBUD+QF4bPH9AUvZEPzVirzGkN/0ZdMYIjatyf 2j/P8Vm1zciQlRh2n6rwkwAuAUYCXEBWG3lWQCKTxVNNhU4zCpRjRUpjAP2t2yoNVTdD RPBs8nTbxP3hJ9VXm5URJBtRl8AnqRZw/+gN1jAqTA/yQJe10c8x/a18VgV8MlYTD6PV FY0w== X-Gm-Message-State: AOJu0YzMK/NT/HRjGtLUhrP0q4NrShCNrZ79FNGuVVY9XuLSlZvtdoE8 Bvc97kL0CVcChs8Tc6xzL42pEd4h145QHlyPEqQVAhVf2OJx3klVQdbeOZkLw6RV6yPyVZ2cw+M 7 X-Google-Smtp-Source: AGHT+IEPC1niNHZOjuVUslCsysj2gakS3mB4FDRf7nTsRnwCrUvYpgW+8vow7iexYBj5OCBfSV9NZQ== X-Received: by 2002:a5d:64cf:0:b0:356:4cae:faeb with SMTP id ffacd0b85a97d-3564caefbd2mr9561959f8f.27.1716959763633; Tue, 28 May 2024 22:16:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a08abd8sm13636012f8f.32.2024.05.28.22.16.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 04/23] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Wed, 29 May 2024 07:15:20 +0200 Message-ID: <20240529051539.71210-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15:21 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: 13677826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17E9FC25B7C for ; Wed, 29 May 2024 05:17:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfc-0000MN-IY; Wed, 29 May 2024 01:16: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 1sCBfZ-0000Le-CX for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:14 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfX-0005QD-DW for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:13 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-354de3c5d00so231421f8f.1 for ; Tue, 28 May 2024 22:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959769; x=1717564569; 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=hMgYxXaloUTsQPPSCDJh2vu8GvGHL7zNyn/AoZOMXq0=; b=XObaMnd3/AmioTfT8ulvzWO97nTncaq+az7SRieaxGzv7sNE75H0jmNQLZKhtSqwMb 1upQZBBOHsCzPhCdgOLxMyCT6cFzp9N5JOn6qhnz2VSS2beRLAwzhWJDveMf8QTvZ/hr bztO47LZGxHDkgkCnojqcgpH7J6W0f+lvQhjSF++MJ63UG3J65dJsUsP8y6So9Uv7tpa 9OcD/aV79Ieamo/RiWpIj/3V7Lio3Ty8sz6c5CwVCpnZ0uZFoVsNJbBixFvdCyZl395G aQBUT/Jpuwo5hfRejqrkQqLFRuF57TFNFHO+Ky2LlLGhMElpNLsta729l4CJGK77SV95 J1Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959769; x=1717564569; 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=hMgYxXaloUTsQPPSCDJh2vu8GvGHL7zNyn/AoZOMXq0=; b=XITXIbIL3TwocpHjcZLFLK7ELRYrL9WS/12rxViB3mUb8FD6aqwXF02XP7Eg6I0bvn ycvhm4qDfaOFFtGksvNErckH0PXs8vlVY6FxSIHW0Rx/HQU4dDsmbZh2xfk9CHbHVUDr Hm0yXDZao3x54p2/m8APT07ucyDlDcjAcz/RC8fY9y04EtCWxQH06/WWVS3Xmu3neZ1/ dYIcd+Fl/g8LzUJnZreceezZEwAdLwXqTn0qMt5ODgtyXkwTTanvsdAUppPaEk9eoTr4 uQhpEnCRmFkdp90OPeSSMRrl0pbq+BnzOIB2nZuTpP7lrFsn3TOq9ieBYVOk+Gr/CKvI 9z2A== X-Gm-Message-State: AOJu0YwZVlxJDDDjY659XQXgGCTt8tqjMiQ5FIYTkxoI0kONPtRhe8h1 Qy4m+CXRQI6q3Bkx8GQQ+L8f5g+rXjVSGaFmEzX35iEcXMg4px5pM3tf/hi+jhLEIE4jx9X6vzQ j X-Google-Smtp-Source: AGHT+IF17tZBdc1/y3WKSQxP8mpRmQy0ayqLGGwvL7MGpUQT8/KWHr08iT8UppyBKWyat4raFIWSbQ== X-Received: by 2002:a5d:458a:0:b0:34c:7ed4:55a with SMTP id ffacd0b85a97d-35c7c2b5562mr559086f8f.33.1716959768949; Tue, 28 May 2024 22:16:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557dceff3csm13831220f8f.92.2024.05.28.22.16.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 05/23] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Wed, 29 May 2024 07:15:21 +0200 Message-ID: <20240529051539.71210-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 7347636d47..01fdcfaeb6 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 Wed May 29 05:15:22 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: 13677844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD99EC25B7E for ; Wed, 29 May 2024 05:20:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfh-0000PC-L3; Wed, 29 May 2024 01:16:21 -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 1sCBff-0000Mf-SO for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:20 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfc-0005QN-2a for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:18 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3550134ef25so1563463f8f.1 for ; Tue, 28 May 2024 22:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959774; x=1717564574; 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=UPt/TtKwH2d17dGaNuovZ1en98JGe101fNTnhF97vQotNDGzuzYWxRHf68yXuIbe9A xBfCMffvKqfiVGXqgi3vK6KlHTsjYEvvUcUiEF+CvULXZAYBAMD24hHm+v3Cd7PZJ2PX q1rWkuhAWw9Kypgy/EApMa54v2tVuI++EB6/xVX4irh3c/D0v6xkTHWCk+UqnZA8qvXf 9dW+NqPpovPufCG44ExL8BoArUeZV4/e77XY+5YVFE7Le2k+wVLcCEwPEaVItIScY1Rz weQ5mSH5Hk8ZcJVWMC4D3zaAXfhIzrhihNMuCrbLGMDHn0yzzQwVop5e5cd4P3Vc6fiX WvnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959774; x=1717564574; 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=V4FinHRlJmNrb25pnd4SPchIgRuucVU7JafIfgyTnWGEy5AV8wSqGvxk1d565cGDYp RShU8MlB7yDKVkgoW4uXwWGITiyX+sBv7h0D65SZLeeeRc+9ghtl6Lgzmk896oeuzHu2 IuNWm6SNkDipoYetEY1RPkUqY48jJd3jr0cr48di1B8SMpcchvvY4LuhFuSBHvcQmfKq +1PeoKLT0W3hS5J2XMqRDv9Mawc/oqh57OQlMykY1eDalqBhOdIXKeLW7CWjoio0NnQw lOsq/xf4lEcb93c6IAvH4z8YlQkrMLoGbWksUfSwRpoxAGu7cy4xH/wmgoWKa08iglw4 qCaw== X-Gm-Message-State: AOJu0YzE58pF17LxZV2d9Lt8ZMJvZfnaoDBJX7N/tRf88dEoS8iq1P3A 2Eez+S/MeLTLuYjpW16vhDbPpqCFJYr19qCb5i5u52t5pJlnF+7J1oECMzDOEQT52sghw6gM7Z4 F X-Google-Smtp-Source: AGHT+IGK+28gnuObNaNbNfecInF9gOkl4hb/3LUU2nGwb1n+Nh3Mf8jmPVvZf/H1p1hNa4p7IVhm2g== X-Received: by 2002:a5d:518a:0:b0:354:f4e6:f9cd with SMTP id ffacd0b85a97d-35526c34337mr11168666f8f.17.1716959774282; Tue, 28 May 2024 22:16:14 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c960esm13679187f8f.80.2024.05.28.22.16.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 06/23] hw/acpi/ich9: Remove 'memory-hotplug-support' property Date: Wed, 29 May 2024 07:15:22 +0200 Message-ID: <20240529051539.71210-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15:23 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: 13677823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5762C25B7E for ; Wed, 29 May 2024 05:17:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfn-0000Qc-R3; Wed, 29 May 2024 01:16: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 1sCBfl-0000Pv-49 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:25 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfh-0005Ry-C9 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:23 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42120fc8cbfso10495475e9.2 for ; Tue, 28 May 2024 22:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959779; x=1717564579; 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=YVhMj/11/Aq2ZQZV4XSJczqrjlikDGNak2hnwkj8uCY3nuFjWJp5NZAFpmsL/tW3xK X8OJva8aJ20dxK3TEvdPAV1+sy2jgg1LL+yYB4j5YRBDlfNclmU5gzenlKrzuTcicnsM aeDmGMgcl+jtScwer/3JiM7NlK4JwpuasqI5aEDrkbCQFNBK2GPDG2W30LMmI651Dqqm vJDwXIeoDBhCPAY9PgNsv4LcXdUu3UcYvvNvOjoxF4hK1Mb3d3i1HTN1HSboh7kHfKkv ErOX2aAPwu6ReuSAdMsszGMIdRKET9DfOyDUuoC+HzE3k+fG0TBq/7x4fH3TjiN10Ibk 6VeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959779; x=1717564579; 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=C7pEnqsgaFbPVWBr76XSGDNv/AaKTUjfGAraT46/na7jAci4UbiqxN0ceF1EgaR4kM SbuaSCKcZRZY+20HJAbHn2EDnyc2wsjCgr5DrHd4ErV30JUVHloUj4A/xzwSGmTDsA4J dGn5iQWD3br5SCUJyRFOPw8HVxprchcqpkA4p+icY2gqa8DiuvZZS/vwKcu1S+mWtXVk hkcR77HbcEVu+PnOb3KAHQVfys1/ELue/tsW8byI8LpoaodFuky0wNvxdkXRg++FOFL4 hdkFmINEjs5dRPC8vyc5/pJdJnP4dDi1osy+dy9XGdcUmvBkyac5CXbQm0OPr5zGH5Sb FPqw== X-Gm-Message-State: AOJu0YxCddLiFDLCHt+4JMoagpJRfMlCBpm8uVCHDUccFkQDyTwuw1Is cfG7VJPR2xCYl+gQOWmb73ezcfqtwSqoFPfdR0uNL5+3P5BxIIXGcumF+ckz8qw3j1WwLkMe3FG 6 X-Google-Smtp-Source: AGHT+IFtuMwiR3qrocQLyFpSauWwy6fQ2CY5rKGl1qU7bJq8f7nkIccVRMZiFTLzmo52+USOllBJrg== X-Received: by 2002:a05:600c:56d5:b0:41f:ed4c:b8b6 with SMTP id 5b1f17b1804b1-42108a0cac4mr113189805e9.38.1716959779617; Tue, 28 May 2024 22:16:19 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a08cc1bsm13761937f8f.45.2024.05.28.22.16.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 07/23] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Date: Wed, 29 May 2024 07:15:23 +0200 Message-ID: <20240529051539.71210-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15:24 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: 13677839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2958C25B75 for ; Wed, 29 May 2024 05:19:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBfs-0000RA-8E; Wed, 29 May 2024 01:16: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 1sCBfq-0000Qq-NQ for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:30 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfn-0005SB-OP for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:30 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-354faf5f1b4so1530811f8f.1 for ; Tue, 28 May 2024 22:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959785; x=1717564585; 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=IfMZ+oKIM4wfvreBQdA4tEvmgHI/5yBGGp5BIKAmFsI=; b=ARgEngafU9da1A0HbwHIMAaZG0L7evXUIdzKWPk7XYqV7RowYV/pvVQBesGtx9dltE aHNHoUj06qyuWtMhiOf8FuvD0J3GI+41Ik4TvvYcp7XkyYAh4CDFitPLwbphca/xDPwZ vQ2epqTFuuWc6BtSmW75ZH2wy6BiBfxNK56ds57OEXUpW/YkJWD6czZuRJPQVnqJfPjA 8TwBJW3LWA163irCxepSfRLodq1qNuMq6e6Z6AYx+OJpGqvkbXK8E9u4Sp3q3cVwL0Hf csFNNgwEZM/e+korA5umczqLgA45MsifXo3bVaVqLMd+62TJaunNWOEwure9E+RrBrLt EtMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959785; x=1717564585; 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=IfMZ+oKIM4wfvreBQdA4tEvmgHI/5yBGGp5BIKAmFsI=; b=azfR2PqYTtX7V+WOUu1o/HD8sARagad8JgwGqWovvIkAU3p+/jtcPhVzcBwbnybIwZ /B6XNEfKEXQVIMmsuhhTYoDjw+dld7MOLZs2t8VuuLz3bDWVikzo6Jx691MYwy0LI+4i uHDXPaoZaJ5a0E/hi0zTFzzImDmL2nkQuRqZw/iozMYjodJcjc7A5aVc/YlEQxRnWPaO UvF7MoGIhzTnS4sOtu9Pnb2Be0ngOoC2EkD3qb5zrG7AzRwyR/MN13rpom5oxHYPCDeg 8G79vVaMQT/NDF6MTQF3RHvMeOcJPZgARYLMdJzfwPxTRGOfp0h4PKD81AjSzz6F4AqL lw6w== X-Gm-Message-State: AOJu0YzmEK4601TTTqEUMUa45dUxOxypyCHhQhLgyd6xmfrc/lvl5Ffs de4L5JABKRS7iUgzldeVfP2+6VUdtY72p80inpGlqZL/azTPMyF6IYwTl1+0P9Tpn80BTpWsHGT N X-Google-Smtp-Source: AGHT+IEX0VXXofr8sEVD81SV1msTBSKuixACz2iTCC6rx1aaEYxvGe4p162Qljv1hn/10soypPjqiQ== X-Received: by 2002:adf:f00f:0:b0:354:f304:cd36 with SMTP id ffacd0b85a97d-35538a61547mr12691410f8f.70.1716959785016; Tue, 28 May 2024 22:16:25 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557dceff3csm13831807f8f.92.2024.05.28.22.16.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 08/23] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Date: Wed, 29 May 2024 07:15:24 +0200 Message-ID: <20240529051539.71210-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- docs/about/deprecated.rst | 2 +- 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, 2 insertions(+), 35 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 629f6a1566..5b4753e5dc 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -228,7 +228,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.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (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 5f0c2d8ec2..9b0e2f11de 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -925,7 +925,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 01fdcfaeb6..db0f8e0e36 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -286,9 +286,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 11182e09ce..f27c9fd98c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -312,13 +312,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 a750a0e6ab..e0b421dd51 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) { @@ -866,22 +859,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 Wed May 29 05:15:25 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: 13677842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2191EC25B7C for ; Wed, 29 May 2024 05:20:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgD-0000ct-Rp; Wed, 29 May 2024 01:16:53 -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 1sCBg5-0000Yu-Vi for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:47 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBfs-0005SL-FV for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:45 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-35508106cc2so1589554f8f.2 for ; Tue, 28 May 2024 22:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959790; x=1717564590; 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=a+2b8ynGFv/PyqBaoMz4GdmSkSdilvbxFOBLh9vRr24=; b=oXGdyagvcQ8O0XH6UhdZPr9CgQYC9jnHEiE31lrMT2Aiz+zbDskwpYtD1e/jzRb5/L 7qpzX/BUFvuQ/I7+0sfCX29pto2oe5giHdLXKCDxyqA7SoqKWyNVCq0isorAckdwSh8c 8st7Sz88tJPWkF2ZhNqALMpp+7cyxNc4xrTPLEYON0UGmK4Xgp3MTURDbBYgdTQPm/Ps hEjip5CVy0cjtnajRVlhmO1s3IOKufuRmj+zf2imB3fCoBbt9MRmzp/3Oyjm05vgpQcJ xog9lo+Z6Hr+kRc0dN4YFFc3X2hpLByo8GNlP7Jv2qvXNAKUQry4dH+NNMBqE7P2PMdo /MsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959790; x=1717564590; 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=a+2b8ynGFv/PyqBaoMz4GdmSkSdilvbxFOBLh9vRr24=; b=rNomJG6KucG7py+kgC2hjAHHsN4nLeRY2I/pWExWXyi295WCPUj/3PWo1B5z8XMrEc 5j4wR6f4ibPo4ul1IyfmG5l1vEcyYVWTxuVE/612CArfgbajVhY2qiZVuUqJ8OXqDX6J gCLJ5Rj2JFOhhrm3psw7umcuTXmfaAB4HShs5VMbcbfPKtfH+NPFdV/iqWRN+DiixA2W RiMJ+gE7kh92ON9ZzIRpkipJUeAiY5mfFb1BHMjkcznGyxSYYfFdOvB6l6nSS0+Lwfg2 m067VOI+5ODMu5+djbcJq9Rcjdd7cD2EGkrhEtJ2aLmXpIfiY6FydPadbbIIZ5nd13OD pVIw== X-Gm-Message-State: AOJu0Yz3MDNghI4M6A1Iy44jQQcG4+QcxwylmVzSZft7BeeMkdLdsThV N27wcwX3mOwnJSz08s7Yk1UX6Bg9qI7Raxr1YVAK4LKmgRX/phryN0k1HYsSXGuhyeBjFT+RloD k X-Google-Smtp-Source: AGHT+IGrN+Q05h/vBY+zxCFDHGU+CskyikH/fZPjX237UZUROptjqqjl+2Sy22rJAdAAAKcq3sp8yw== X-Received: by 2002:adf:fd06:0:b0:355:130:98a7 with SMTP id ffacd0b85a97d-3552fddfa4cmr9648860f8f.54.1716959790307; Tue, 28 May 2024 22:16:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c93c6sm13634147f8f.85.2024.05.28.22.16.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 09/23] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Wed, 29 May 2024 07:15:25 +0200 Message-ID: <20240529051539.71210-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Reviewed-by: Igor Mammedov --- 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 f76972e47e..f9b99b5f50 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" @@ -178,7 +177,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 Wed May 29 05:15:26 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: 13677821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92CACC25B75 for ; Wed, 29 May 2024 05:17:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBg3-0000Ry-RY; Wed, 29 May 2024 01:16:43 -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 1sCBg0-0000Rq-9R for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:40 -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 1sCBfx-0005SQ-MU for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:39 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-420180b59b7so14456325e9.0 for ; Tue, 28 May 2024 22:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959795; x=1717564595; 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=ZYfe4vc/CTJtZbzEujtkTGONgqf/hq328cSMsazz6nQ=; b=PovN6opYaNu1Hrs/HLw3MrnPJL3+/OYVNXL1EQmHaUXBzhaiz52zr75nqu+h3jiK6Y PnhI5u9/4C5572h/+pHO4YuWchPcTjnUVcV4DYd54WuWsCE0aYPjJXEzMSiCeFc+vNEA G6sHe9CcT2lu/Hg9oVjNTEDbJ8QRbjdjmgApeXFX5QT6I6i88/DXW0LykyfCrdAc/20F Onc4zOI4KtcWXKkZpO0/Ogkt7DJx3W6O/TqvawSOoilZPu0KVs1MFCmtT4KtI1etk0aT IS3vpEy+d+vW3p5L7BGXVIi1A7FG54XRzG3JSK+mxsRXbC60fSHH6A8PxPxpAyGFC54w ReLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959795; x=1717564595; 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=ZYfe4vc/CTJtZbzEujtkTGONgqf/hq328cSMsazz6nQ=; b=ZjrVeoNqAeR3VJaXL56OSXCFSWqC5x1BZJT3aDRmI/3C+GO1wBgkUDlORYrPNfcWuW Y59aaj1TlnNQQ3WrfnQyPvBLDbcJNLYWyDaJvX8JMe5ANL+wfcV+vChxjrM0oJXXVi3N dCg+PTTSM9BkBsnRhqdiaX0QGoXMXjoKdrSd176qQA/r9I+yYD0p4eDZOzTwLsCAds0A rC18wpvXJrEiGsu6eFgsS/rIMpfZOMyXZ9k1jwGRFPhpoCqDMfrtX53OLELnS8vFsp7/ J2aE94tTwlh+MRnJR/sWOb4xaOHtrR8ew2BbP9Vb/s1mYikhLVmGr3fpmFPb26ES5eSl vuIg== X-Gm-Message-State: AOJu0Yw0NpX2d6C2fkMYf19xHbeiSVyamydQ8qxpbaGOWi7vQNWX0jnw nUnjG/ixjYz4rf5t5GyNVJPPyP9PjWnHbQUz7Q32hLWZi+jJ/P0p2lwPBpK0RfTrNGTAod/6WJ6 7 X-Google-Smtp-Source: AGHT+IEkc8iKL/RCcL9yCrmvVdFzlzCik27p1E/HI4uJiU+V+1oYdBeXWn5HaP8tj0gi/FpEiBbQqg== X-Received: by 2002:a05:600c:4f52:b0:41f:fca0:8c09 with SMTP id 5b1f17b1804b1-42108a15120mr100716555e9.40.1716959795700; Tue, 28 May 2024 22:16:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42108970b4esm166657385e9.14.2024.05.28.22.16.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 10/23] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Wed, 29 May 2024 07:15:26 +0200 Message-ID: <20240529051539.71210-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 db0f8e0e36..bbbf58bd42 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 6e0d9945d0..f9e8af3bf5 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 f27c9fd98c..4b2a29bf08 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1790,7 +1790,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 Wed May 29 05:15:27 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: 13677825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 119CEC25B75 for ; Wed, 29 May 2024 05:17:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBg8-0000af-KV; Wed, 29 May 2024 01:16:49 -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 1sCBg5-0000Yt-V9 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:45 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBg3-0005Sb-Qv for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:45 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-421208c97a2so11309265e9.1 for ; Tue, 28 May 2024 22:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959801; x=1717564601; 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=O73MgAqxCyDJRattXRNH8siGEuP7PaWdaiYd5+dzTsk=; b=bUPVWNjlue+4h6Z6iyUK1MwEvJ13XyB6sOTWIkPA0mbaSkBzafzr1AHwnNVHkRpr0X eykAOjGWmFt6iqYqGd9GHSaksJV/QNAzUp2DmSexoZN8P/NCsKHWSkbEgDn8zqvmqiKl jDfztB2BpnFJPI8sU2wxYoa/kHcdlX7n84PO0/6VQtVVzrPfR+sTzzOHBV1yVfKjaF6m 5Z1lhuaYvj+w40AgGA+0mlqvn2SVIziKIKnVmjd8YKdzV8cZ7iHnf3DQVBGr39eG/ymQ Rfo7ipFVBxe6mMJwkTuYhgDxj+lBxAJjJ1Z9nQxhWlUAzI/fmhJxUqF/XfY/VTydGg/e XVKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959801; x=1717564601; 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=O73MgAqxCyDJRattXRNH8siGEuP7PaWdaiYd5+dzTsk=; b=YeqD/cO+y1WrCM5jtBFouP92sf6fYfGjS97WYSKmrQZf2+X983cdqr9sOJWL+x5E+A psVyasLqKQE8fuWHXMWNBsVxIeLpyVQJcAfwnVV0wpgCVWiZZcGjVpQgGNY/I0xqahzg A2mjY/VMhAvFnfn30LS7gL09JFatvrnk/g9oIGP+Gn/1Q7mhJzmZJ10ff9k1xRGScOfE ReKHZZ+MHpGoeiZyI4VHRpxT2RPhWFfYg6s0DSurFKNUYjQZq/4re4Lig4iAq7x+a4qY g6C0FpP9/4ZsnRrcWzK7okoMVEqvXyJAkWfLLq76pV3QtyxoT77+AkX1IXrk3baPUg// OeJg== X-Gm-Message-State: AOJu0YxR2fbFHclRpGhgzoPkYYdoyNWjNzKgCqGu98kGTBf/3mXGuNz1 ux5QnU7pBm3OZhcyaPnrpy/wLwtG97MYrPdfXQSlJ0gu6Q5Yz/Adw5lOQx/K5Uqm/dGK+EaP+8V j X-Google-Smtp-Source: AGHT+IEG3BPRttuvOlB6p5jccpB/47MFc9OqA0THQM7cwIFalYc7LG2HS11gw6/yq8++kieeTKLeVA== X-Received: by 2002:a05:600c:19d2:b0:418:2ccf:cbc7 with SMTP id 5b1f17b1804b1-421089ebd3dmr101096595e9.2.1716959801223; Tue, 28 May 2024 22:16:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35579d7dbadsm13741060f8f.1.2024.05.28.22.16.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 11/23] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Wed, 29 May 2024 07:15:27 +0200 Message-ID: <20240529051539.71210-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 'uuid_encoded' is always true, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 3c93c0c0a6..268b25e332 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1677,8 +1677,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 f9e8af3bf5..7c43c325ef 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 3e6e93edf3..6a12659583 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -529,7 +529,7 @@ static void virt_build_smbios(LoongArchVirtMachineState *lvms) 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 4fdb660525..5676d66d12 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 Wed May 29 05:15:28 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: 13677831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75041C25B75 for ; Wed, 29 May 2024 05:17:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgH-0000dw-U6; Wed, 29 May 2024 01:16: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 1sCBgB-0000c9-DN for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:53 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBg9-0005Ss-Q7 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:51 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2e964acff1aso16416381fa.0 for ; Tue, 28 May 2024 22:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959806; x=1717564606; 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=hekKaadge6WgKwFkOMFpgNYomJX57IUHABKjpUTMXebqy2y2e7SvKjvA6LAjTSRecM E+oTSu/Wvlz8tLh5ZLfukyIZme9B+TshV9W6KfOm90TTpBwA9BQx8EIqBqn7IsLM3srJ Uf6bJnymvS2SO42zOMKDe6vDlBbTGYgZsz+vieXHMDdm7J8YIqGS5FMrAyTQlmdjWl8j Xj6spMeKDrtnnEdyZrw/P+Ulho6uiihib4wqNvEWaBlMbM1cCTgKApBrMmqQMuNPhqhA HAEi0U+rbLDN5/bn/19/j6n8cC4vuivDdF0iJoXIan7dNQKbHRafEEGyeXMQjjNnzF1h xMGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959806; x=1717564606; 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=vJ1p/ra+uLEhx8710lOqxXZtdvQu+Hq5ka5z4gYNIpxAv4SO5e1qQlju0xz3TKNLa1 oSNGBUjAWCp8qw+rRrebjs94j2xWOw34wgiBTnGimy1uIS+WiPnzcTxSDGGEROOx4UIe W7WGExdREslumY84JpkIrYWGWwRfroV9fRxOyXZltZq4ntyKTlojVkQ99NTEm+HyeCGm opfIP6k1lMv87wSQXhvq7CLqpf/OBRO9NMg/PPj0WBVlmTktQRVp0LJF2P/fEy87Y6Rn vuDgeBU0YxHfFk2S3jiWpggpKMeUdnZjflBVCPYYB1WlKTEiB/VQa9HnDhTGzcQeLlIJ n0AQ== X-Gm-Message-State: AOJu0YzUQLhaV3ocwIXJY93D4nEJypdV/xTgkE4peTGu4QE+AZYCw8wK YrlvzQ0DxJ1QxP/u1P1HYps2DYZo2nOHe12fOrgVI0of1sUkvk08iP9oCNKWsjEvFH4wsNGFTsq Q X-Google-Smtp-Source: AGHT+IEIfN4CrAwgABBGQI34J71C7M7OXR1LVEO5nV1kLjBfXW6qRpqWT6wtNJREceizeCcO7tTiNQ== X-Received: by 2002:a2e:a178:0:b0:2e2:1a8b:e2f with SMTP id 38308e7fff4ca-2e95b0bcf29mr88847571fa.2.1716959806519; Tue, 28 May 2024 22:16:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100fadcabsm197280155e9.35.2024.05.28.22.16.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 12/23] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Wed, 29 May 2024 07:15:28 +0200 Message-ID: <20240529051539.71210-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15:29 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: 13677827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B78EAC27C44 for ; Wed, 29 May 2024 05:17:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgL-0000kr-6W; Wed, 29 May 2024 01:17: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 1sCBgJ-0000eZ-KY for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:59 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgH-0005T2-Eo for qemu-devel@nongnu.org; Wed, 29 May 2024 01:16:59 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4211245e889so13189015e9.2 for ; Tue, 28 May 2024 22:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959812; x=1717564612; 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=qPnHhjOaBQZ3Ow97ZC1wmDUA3K0TF0F7l32KY6p4pCI=; b=YLj9sXcUHJ4qWg9x54JGCBeB1zmJpiOr5SRqjD640JB9CcaJXZ71Zs00xXg4I2s+sC 6PSOLmeRuYum7BUVApeTpY7HDKd0UAJmMVQY6Sfe8q9EyuVWYYVN1FSmAKJarneIkrU4 1AII5YZwIjXtAGS4zdrXVav+vom5qxAyjPARzA3Y+X9UkUMGHfjdhHaxZFTmI/cP3MN4 xdNy/AZMjgE3det1wnfcc+n//wrsB9xcV1Hsf1jgZPIr1jq2bVDZN9EhansVRMEHJMEl yqzIjSsRBhbN2oL9cwDPdcZWCwqdcIOvrh5wc1GiDxMf+btk1JUeyiEAdbykOPC0MEgI mGDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959812; x=1717564612; 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=qPnHhjOaBQZ3Ow97ZC1wmDUA3K0TF0F7l32KY6p4pCI=; b=CyK1bEfXWbCGxNygFqoTnQylps68cL0byHydqAArXgYH+dGvo2b5xrDmGf2aZgwcWN zYGYuE7DOhyVShTaOQn6YK5uU0RTPnHPWYFwVaPXVA5CM/c5tsu23ndBNNruXml2Xeu2 Y7XsFvigM13Vv0spzX4WE042w42LYiO4Kb12xlsBC7e3KyEWTtuqNOTodX9GM8Q1y5KI gOtnhxRWmb6Yc6J3SM0dNis+8ElyDPOWR7mENbTsmH/+ZlqBhssk/nbrFkXpYwHL5m8D bY1Rgwgb3kNUtNh0UqeuGEpc4rz3LWcCR3z5l31Q9fxDTdY6Rc0NX6MI7r6Hm3LM7PHh t7Zw== X-Gm-Message-State: AOJu0Yz9D/NSVM/qvKkzxr32zYIhW9TAEY7p3xRiSHSb5+akOgCWBPyH XbNleV3IoHf4BFd8ON0vVJl7fH45GUNOTgBHX9WLXPv/otUbgVxlIW/MPZVYyKKFfFJauWMb0+q y X-Google-Smtp-Source: AGHT+IEWKEROY+PjXVB9vHyJs88/9eT6MeOl3gX/uSV8f5G4ZIp7Yp2oNcuP4rmoUeH/oRrWFkwK9A== X-Received: by 2002:a05:600c:5108:b0:421:1fbd:8776 with SMTP id 5b1f17b1804b1-4212102c29cmr20577455e9.24.1716959811828; Tue, 28 May 2024 22:16:51 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4210896fc7fsm163853725e9.12.2024.05.28.22.16.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 13/23] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Wed, 29 May 2024 07:15:29 +0200 Message-ID: <20240529051539.71210-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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é Reviewed-by: Igor Mammedov --- 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 bbbf58bd42..1351e73ee0 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; bool isa_bios_alias; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4b2a29bf08..9cb5083f8f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -727,7 +727,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; @@ -735,10 +734,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; @@ -1297,12 +1294,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; /* @@ -1327,8 +1321,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, @@ -1792,7 +1785,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; pcmc->isa_bios_alias = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported 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 Wed May 29 05:15:30 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: 13677840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EA8CC25B7C for ; Wed, 29 May 2024 05:19:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgM-0000nL-Pk; Wed, 29 May 2024 01:17: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 1sCBgL-0000md-Mc for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:01 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgI-0005TG-Ud for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:01 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42120fc8d1dso11457425e9.2 for ; Tue, 28 May 2024 22:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959817; x=1717564617; 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=Kn2QkW6roygyEjQL8EjLWez7qhV3aYVFxACDYZ5R7ks=; b=cV/i7/flYRvlPUZ2cA4AT1IU8AR2gBRcYn01OUxvzl1YShs1NNLTD7eSvzB0sixdic m0CG5CmrtbvqV6WrHa6gT7/P4U2/uDZ0Rbxur9fhOPNoA/fwMChO89ACW2pwE8hueyb0 CadmvH1Wu+nh5lX1dOYhitf58/KVuFrOPAfy2b8YdcRBEf0BuvEMGaQrKScC7Tn5oErs Onp09VXwOAiZ98Fpu1QbAb81lNmHfgiT42Qy/Ag98bAt8z3lNA+53BJcY/be8QZR8D1w 1gKeLB9PlcjWVV1LSN10JwW3FYSQhQelTjqwbzux5XEuYeP2/rdaboMzPEuU/dD1jFKt tkHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959817; x=1717564617; 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=Kn2QkW6roygyEjQL8EjLWez7qhV3aYVFxACDYZ5R7ks=; b=JSfOVdtxuLbSOEVrQ2bTRobdXnZpYy46tDoU2pvKZZiAgBgkYXGEZSf7wyBq7YRwGC uPbD9TAaBEGgozVqvcXObVWZLVrSQtJa77niQP0L02bmWp9zqkzRzPxcG1jO9gutxCCP fv+zFvBYjHQalgVLC462TCbsobCqVd0hYmCVrM0u3AiiuV3Ky13kQpmfQIVzixSExruK VwwkkKjbRZX9ZO7nSBLv649d0oi139sQcn1rTLpEhvD/Um9eWlPkROQb3mjS7wq5UFrs GjHRU3e0jm5D18tygTeROn7/cxWnVB68zFzGToJxb25M+aF4Q8NG70FbOFqtL3gPpfho NIxw== X-Gm-Message-State: AOJu0Ywb0w0V0eHpY3Wva9sxDHTKrfCTouU2pbdabuXlNRURl6j3PZwr HpYCUzENeVzSs0iuyCmN3Kgno6jtVib8j0S/7CQ/GApa/Dg9It0YQp55LLz3ofxTbrexdMLhWI9 J X-Google-Smtp-Source: AGHT+IG+LCqe4eRzjAw0ply5oF1T7owpp+j7u6Jf1ySFg2WotIaG/dn55pG5QehH4dCcDG3ssJHGgw== X-Received: by 2002:a05:600c:5788:b0:420:e4b:d9df with SMTP id 5b1f17b1804b1-42108a59336mr112221525e9.13.1716959817188; Tue, 28 May 2024 22:16:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421089b0410sm165022025e9.29.2024.05.28.22.16.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:16:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Zhao Liu Subject: [PATCH v5 14/23] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Wed, 29 May 2024 07:15:30 +0200 Message-ID: <20240529051539.71210-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 268b25e332..c7a1f754e7 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2763,7 +2763,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 9cb5083f8f..08d38a1dcc 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1321,7 +1321,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 6a12659583..c8f16d9d6c 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1133,7 +1133,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_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 4345764bce..e7a5b7ce8c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3700,7 +3700,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 Wed May 29 05:15: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: 13677837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC584C25B75 for ; Wed, 29 May 2024 05:19:28 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgV-0001yV-N9; Wed, 29 May 2024 01:17: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 1sCBgT-0001Xw-9b for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:09 -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 1sCBgO-0005Tb-CN for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:09 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-35507dfe221so979715f8f.1 for ; Tue, 28 May 2024 22:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959822; x=1717564622; 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=cP4SJmd641/ILObPtvPnzO9UxxYsK/r7Vja2+3khUMQ=; b=eqiVZlr3PNIlCUXcXmEGlURZZc0zWS0PeCjt9bjeEpFGZ+sqrrvZ69GpS2IHygZW/w ZixBjKHvtuFjom2r/ci0+CmfFIjQINYugX+kdmIsk0NBjZhGst6y0eb30yfq5Ej7MFr6 oBhRrGuDwqg/IeYnxlL4g8q9YLzp68Pk+8IZJUepfxfRpNZJC2UYgN8XVgYzthrnAR07 ZAYCjHzFvPSG47UsduNtc6J2ddwsTYbcn1f5Roatqx/rWQquNxRX+2KaBU6l/Cz9VOnY 95j8wIv0YdHZNXo01GVOGXy+riziY7HvzpVpHBJyay3xpTkrEGPkkhCetC07zg41zY7z ydVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959822; x=1717564622; 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=cP4SJmd641/ILObPtvPnzO9UxxYsK/r7Vja2+3khUMQ=; b=w5VLvWN49E11HArKez04OeykpWu9vQvMvBueNs5vynSLPICAIp7+Uhw7cD+YFJF8jv U+Y9lUfJt2UyfhdWgsrLByobCkou0jgq8iUyXroJ65WdRQJA6QliJtcBkjwJiS9313X5 aYC4EwNs3d6CbFwWoEm+fAW7U3vjqPDyp1PT+V7VkAiw+IPEscrpKkcKLJPYN7ZsJ4ML Fj3ZXtFGWrSRkqENK9sZ5WSL5RG7gnjK6RxfY1mE5jnPlBupd0dRzx0jLf8kQD2DxCOe yqvvqcek8hMwKvABNpBXCZY8FqZLJCdzk3OrgKafbJLxcG7lj382IbYTaGhhNnyoLFFJ ZiVw== X-Gm-Message-State: AOJu0YwEEGdHTGF7/wVZrHlGiJ4jcQLtV7LDlwUdEIEScKvgOCdyx8Hh 9LVWdTP1PtJE9GRH8T1+GYGTlK8k4fPgdBO7w9YsQLSO4wcFBxsy0hY8oPyR/LiwAkpOxCyfMRg J X-Google-Smtp-Source: AGHT+IHShXyCN6PMNlPiGnzTp2uDsFQqNoRm0GR+DevpKnNUkEpQ8XfJxMmUe+lT6gqhdAnd7vpWAg== X-Received: by 2002:a05:6000:2a2:b0:357:9345:5a4a with SMTP id ffacd0b85a97d-35793455cc5mr11626754f8f.55.1716959822616; Tue, 28 May 2024 22:17:02 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a08aba8sm13593334f8f.42.2024.05.28.22.17.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Zhao Liu Subject: [PATCH v5 15/23] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Wed, 29 May 2024 07:15:31 +0200 Message-ID: <20240529051539.71210-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 08d38a1dcc..c7d44420a5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1389,8 +1389,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 Wed May 29 05:15: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: 13677834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 592D7C25B7C for ; Wed, 29 May 2024 05:18:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgl-0002C6-Ir; Wed, 29 May 2024 01:17:30 -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 1sCBgV-00020S-TZ for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:12 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgT-0005Tk-VH for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:11 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-354fb2d9026so1542004f8f.1 for ; Tue, 28 May 2024 22:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959828; x=1717564628; 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=srRkm9ae2J9ZTUMkjf3HvKLm6bgUuxUXvAdMOqZAvf0=; b=LZIQlmJR5emirMDgata8LYtMV2R0o6z4ckhphVl+j9uqrQ76f0wiqCXJsyDuWS0Z/T NlC4NoEPWGl2M6agNIIrQV/kCFscxUHEOE+Vmp5owNzp2qfymkiRHOwIl0eAhMywXQJT qLyW7BrCBb+moN2FV0bRiGdN9fj7GHDI9lu284dkFDvKE2sr65ECIsvIJV+Jq88DctSV Z/PrfhVunJjYMprL7Ih6T/iuqmiJRweDniYo5txAIYi9Qh8Y0QPl3oTlmMQqNb255xUS hGSpfiMSguW9CLKvOoXyyuesT9yDVdLogCJdy6Thp9FuQxQNEPuNvEqv0e4sjgbZNzBm BBVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959828; x=1717564628; 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=srRkm9ae2J9ZTUMkjf3HvKLm6bgUuxUXvAdMOqZAvf0=; b=tEI38WNP8DMWuePDHBiWnrsoCM+hlblmujcPHyjyEnqCh7GLgM8DM/qXg2ouecDu+V s+eBQeJLQbVVFCtkOMeBKf1G3e8h5AtfC3FEUTRSemp1DhwQgneKJT7EbPVckrbdbNsK oi6cw0w4eYveSdMgszunw2FFz7u5oE6mvvCgV0WkR7T++KfIQ3yqziZXTl81ZzboT9oW k1Ngshbcj0QPA55JexLYjFn4TyfLcwTczG4qo/MVpUzIqvyJGl90C6J2E3NVeZXfRgXM 5sGBm1NfQsnw1Ovtm9U5D33xTuiXGq+UpeSnYXKBt1f2wdy3mVqRSqaKKQV9h+EMSIiY m1sw== X-Gm-Message-State: AOJu0Yz35bi52De7ddmLodnS2Q+10HdH1Yarmd3IJvLK8YCEd86jXhBR iRD9H8TN6n/VHc1DwHrmP/J4SX7XjLDBfRNX/dquMgqnIzx3hh4faDrMm0gEXcT7LwgaM67f+Gs B X-Google-Smtp-Source: AGHT+IGa7Y1VqhaMCYmBwI30mKN4y8KM7y/yKhmwwIrlnYbXluGskgZLqcwcwteEKPFzuV7vSmBahg== X-Received: by 2002:adf:ed8f:0:b0:354:ddb8:b5e3 with SMTP id ffacd0b85a97d-35526c15a10mr9023854f8f.11.1716959828135; Tue, 28 May 2024 22:17:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a09090fsm13628170f8f.54.2024.05.28.22.17.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 16/23] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Date: Wed, 29 May 2024 07:15:32 +0200 Message-ID: <20240529051539.71210-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The pc-i440fx-2.2 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 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 23 ----------------------- hw/i386/pc_piix.c | 21 --------------------- 5 files changed, 2 insertions(+), 49 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 5b4753e5dc..0fa45aba8b 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -228,7 +228,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.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (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 9b0e2f11de..5d7bb4354b 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -925,7 +925,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.2`` (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 1351e73ee0..996495985e 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -279,9 +279,6 @@ extern const size_t pc_compat_2_4_len; extern GlobalProperty pc_compat_2_3[]; extern const size_t pc_compat_2_3_len; -extern GlobalProperty pc_compat_2_2[]; -extern const size_t pc_compat_2_2_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 c7d44420a5..ccfcb92605 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -289,29 +289,6 @@ GlobalProperty pc_compat_2_3[] = { }; const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); -GlobalProperty pc_compat_2_2[] = { - PC_CPU_MODEL_IDS("2.2.0") - { "kvm64" "-" TYPE_X86_CPU, "vme", "off" }, - { "kvm32" "-" TYPE_X86_CPU, "vme", "off" }, - { "Conroe" "-" TYPE_X86_CPU, "vme", "off" }, - { "Penryn" "-" TYPE_X86_CPU, "vme", "off" }, - { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" }, - { "Westmere" "-" TYPE_X86_CPU, "vme", "off" }, - { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" }, -}; -const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); - 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 e0b421dd51..1343fd93e7 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine) } } -static void pc_compat_2_2_fn(MachineState *machine) -{ - pc_compat_2_3_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -843,22 +838,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, pc_i440fx_2_3_machine_options); -static void pc_i440fx_2_2_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_3_machine_options(m); - m->hw_version = "2.2.0"; - m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on"; - compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len); - compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len); - pcmc->rsdp_in_ram = false; - pcmc->resizable_acpi_blob = false; -} - -DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, - pc_i440fx_2_2_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Wed May 29 05:15: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: 13677829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56341C25B75 for ; Wed, 29 May 2024 05:17:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgr-00031y-NX; Wed, 29 May 2024 01:17:33 -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 1sCBgb-00026L-IE for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:18 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBga-0005UD-0s for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:17 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-357ec504fcdso1172015f8f.3 for ; Tue, 28 May 2024 22:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959833; x=1717564633; 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=+89nIq6Az7cr57eP5247OlrNJ6UHgv8xML8ZTJQpOfU=; b=dpcZhiyTb6IvIoM2yCOpZeaqmp3/rBTQOXSeJ+ZcwtptxvEBVBiUNH47/LOwPO1xIj QXMbWi5K4OQVVYqV50URBwONdTAkzeXgm21Yw5Rs+67j7t9b+BkLOFvGCLlhgcVvsS4Z KVa+nfg7ydzq1VT7idco6mFwQs/4fH+BtmW1UcxEcZ/iGM2sEqeQG0Q6kNZOQG1NzUsU x9YXd6fr8brF6stv0YzDJOk5ByaCfM7rDaVb4RFrrWGLv2oYR6jw4w8L9gjoFKv46o22 9LkgguagHjaw/MhALF9kmcz4YW0SbIX5qhCwlEZjNNGw3AxjexzruY7jiDtfyE2Ufuni MOrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959833; x=1717564633; 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=+89nIq6Az7cr57eP5247OlrNJ6UHgv8xML8ZTJQpOfU=; b=ijJU4h1lw7le5EhCv09l+uwjkuu097fqfTuiLf3H36MkrhsJ8LGtK0n7Nv+NwpwB1W ppRuT2pxYxkn8pq2fB2dtCcO/3xmpGgzSfGSEN3HIiWTC+TNFU84AhdQ5PVPPdKHf9fU Hx5NorVtro3p/o0LhdDmOcxDiFMFzFTQ0CeVzLxiyMeKtzK3Y45ciPAY3BvgWZyQBOa2 s0olKpfzofg9FyzD3AWhqDDK1MhNsQiiciJj0y4A29vr3rgPPdvqszVRplPEHK1FVsMA zLBHbtj+iI9xuZA0vCJ6OBr+EeXGQJR0Jk6U/EWLQddaGfjXFiyWAdZMoI4PO1Z5lQEA /g4w== X-Gm-Message-State: AOJu0YxBSpHQz3XG0mcw7/+0X/p2vbIFEZR2jMzrBratrYKnT3thUfH6 6VOLlgQXHNOfHaxRuKtV9NSF0e2oHK/+OaN9yS3E336Z96P6uEJPb27WF7YWRuKPd1a5E+o/ihV K X-Google-Smtp-Source: AGHT+IEb9D4CvQ+rKR78oy21rdvdiIq7pR2MaTk5nNpRsrWg5we13zUnEQhpyyhblrx2eKWnPHNahg== X-Received: by 2002:a5d:6649:0:b0:354:e04d:13e0 with SMTP id ffacd0b85a97d-3552fdf23cfmr10446226f8f.46.1716959833412; Tue, 28 May 2024 22:17:13 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42122299300sm17739485e9.42.2024.05.28.22.17.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 17/23] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Wed, 29 May 2024 07:15:33 +0200 Message-ID: <20240529051539.71210-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Igor Mammedov --- 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 996495985e..808de4eca7 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -125,9 +125,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 ccfcb92605..fae21f75aa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1768,7 +1768,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 Wed May 29 05:15: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: 13677833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66917C25B75 for ; Wed, 29 May 2024 05:18:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgp-0002dJ-KE; Wed, 29 May 2024 01:17:31 -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 1sCBgi-0002EG-3m for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:28 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBge-0005Us-Cq for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:21 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-354f3f6c3b1so1330868f8f.2 for ; Tue, 28 May 2024 22:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959839; x=1717564639; 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=tqcbdlkR2ui35s3mBkq0drbvjn2gkPP4SIGHg4kmOag=; b=xUuDaIGPjYyvpbsvehyGJc9sGXRvpLBgusnTAajIgnapCh3qICbNAO25Ypf1yh3UHk +hZrGPOMFq4gFPhhJSQaXatNBnsB9EQ5Gj+L/jpAVAiUCh5gJKsFHSIOUDsgyCMI9J6y pEObftO+FrHMJlM7n1itI0RhuF9eWYzVWFB5FHgq0/dKTqh8j+XwOv1zSfzclZ7kgehs 1Oiu1Rj9tW208tGkZuyIUgUO1yvY+ERrolOSkzHHGQ0yXS67+KNSEvHU11YbbXogBCRa qIzrVbTDfMMPT1O1dHmjkNF+AtvUWtbe1iiuWlCx2K9QhkX9LxGIfarZxWXklAr+Tpd9 IEpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959839; x=1717564639; 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=tqcbdlkR2ui35s3mBkq0drbvjn2gkPP4SIGHg4kmOag=; b=VhjTM7GtSdthRey5ajspRmQ2vvmrGl4LzUobqGfhTWILyzVg4lYiidUb90AUAV2htr V0T/AJktrhDBTr/VOEtJZu60kmhNwP5jgidBpeQCptShnFFcbvtvnRs5X5JA6fkd3/G2 PfwxC+zJdh8k3AppcH82io2Z1hGQjp4aZ0igYAjkFAfNsTm7WespAeCLQvuDJbn9ZcOi NRizraGf+zlNklu/ncPsmohmUDpBRmuLAquYL6RVtNo5VGuMVAfhGcg1dYp94rtWWysb E6Lef/kbsABLqq6xjEi+AVT5EAoWm2/Yg5Lm6wn5762fPNU1qU+m64dJpb4VgNJfyJiU W6RA== X-Gm-Message-State: AOJu0YzvkU+n+OYzd6dnwJFFFn0gWMlwpev8jhLifEJGI4RKTIfEzbzQ rTRfCLm6BkwkaI2Yz3J8kzg4YsSJohbKY0A3/rPgwxvsNX5Q9HVhPfFU0l+zStG3eHfLqVa4X7M R X-Google-Smtp-Source: AGHT+IHJUgCnvZmpiWow4SSgH/UlvWwt/9Pu6ZrEHclDP9g2KUv9HUAyU+MnnKmcgTsp9uwRBeTVtA== X-Received: by 2002:a05:6000:1284:b0:355:1ad:90da with SMTP id ffacd0b85a97d-3552fdfa487mr9122381f8f.51.1716959838817; Tue, 28 May 2024 22:17:18 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f5299dsm193019945e9.20.2024.05.28.22.17.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 18/23] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Wed, 29 May 2024 07:15:34 +0200 Message-ID: <20240529051539.71210-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Reviewed-by: Igor Mammedov --- 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 808de4eca7..63568eb9e9 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 fae21f75aa..8e51d1f1bb 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1757,7 +1757,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 Wed May 29 05:15: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: 13677841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1C1AC25B75 for ; Wed, 29 May 2024 05:19:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgr-00031S-JV; Wed, 29 May 2024 01:17:33 -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 1sCBgn-0002QF-PN for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:30 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgm-0005W4-52 for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:29 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2e95a7545bdso17348471fa.2 for ; Tue, 28 May 2024 22:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959845; x=1717564645; 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=DC2xHT4tK3V/eBcSroqFKTXibEqMvehvouzWEl1ZI6k=; b=YJ+hxImjP0MRYH+jf7KGCruCwyo8URyafB/PJPGR6w/tPg1vyHhJr+78yD9WdFp58l hSk5gKWBbmMyweg8OgbjbLU/zz0IOyqlWVzFbpg65RRv/yIp1MZM5/lYveRg+vhXNSso AEDYhb/vHYPdG/q4k5aunWrQHTWfs3C/44nC3l03pns+W9mq3FbGNl3xDBvbocw0XfKt SYUh/GW8Z3muTHk8ov2GooJnUTFzf2DrVjPdg1atuyNPGp7tTur3l6vs7SIwdEaBl6iX mOyA6AygQ5yAj4Bdg8otcm5y2ERtzAPRCjk91W+yQIhKa4zNYxnVELqXPELq3l07j/11 2HcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959845; x=1717564645; 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=DC2xHT4tK3V/eBcSroqFKTXibEqMvehvouzWEl1ZI6k=; b=MP1rjvPBQ++2Ht+FP6AgYPPz8BNKJPelfk7jDdIETh7u+HWcgkReMkZXdvKIvN42LN 1eSj4pqX0G7irUcy6gsmRPYCzvBsFyH8qmddToq1xMjVCDp6s7NwoRLTkDTTGOUUvekh m/50lbCxhEJjq3dxlqsv47C5Mj1MqM9Q5pmFNVD/CIv1SCwNuWk5uumXbFdSnEX5evx7 cuF3aZP5mMjXU9gR6XdbPF6HCfHT1HucZ3rs2jg/qKdKOfZmjyih4nesJ7i9xprYHNO6 nqblHT7cq1kgwsShx/Tr6aGxr+Tyg5M9TU7MIx9Mla790555b7aAj3mDah+uPAYjkjkn rznw== X-Gm-Message-State: AOJu0YyXKLuO1+yqCz7udOMmTodbq2zawT0tOgh7d7zt+PRzimObENbh FGmF2X653t0jsV/chX5jHJjgwxf+FQp4vFj/xiACcb2p3FSt9jBgxDQEeLhld/q7HVz8CvIpgks a X-Google-Smtp-Source: AGHT+IHZzGSSc7qW/Dzxo8mIOm0byle59nSLMwU+AQreUFSefOfSLWDFegUljIEF2M4tef7S0b+Zvw== X-Received: by 2002:a2e:8e85:0:b0:2df:edd9:d005 with SMTP id 38308e7fff4ca-2e95b096f47mr78480841fa.14.1716959844077; Tue, 28 May 2024 22:17:24 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212279b4c7sm14423485e9.0.2024.05.28.22.17.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 19/23] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Wed, 29 May 2024 07:15:35 +0200 Message-ID: <20240529051539.71210-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 Wed May 29 05:15: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: 13677830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E68AC25B75 for ; Wed, 29 May 2024 05:17:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgu-0003Qz-DK; Wed, 29 May 2024 01:17: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 1sCBgs-00035h-Cs for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:34 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgq-0005WV-Ag for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:34 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-35bf77ba951so972384f8f.3 for ; Tue, 28 May 2024 22:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959850; x=1717564650; 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=nzOkK/6FwavJEbHE1R7du1oGmMgzpDdcDl3/igK8u5I=; b=RaGfaNadTRSUc4VrbCowMDVFFbiCbVST0MCUCLHQVsi+lu7+5Asc1kWFkqki5hwDAZ wcf6xY8GMAfAbLEFMBxuTMqZdwW23ccNTbBhs+e5F9LACV9DQXeXW+eehOQFze6niKl+ M1WuuStwyWLLDWml6GByJPGww6eJ3Rzy9MdbmgTjAuVOBn1AQQuEtFNqJCuxe99mH/gB 07JDPJGWCdnwLCCGO+0fw/xcwlT9tm1eoLs1qHW8Bt97Deb2S4GauH7SPNxTFE+PPWIf 2ZrPW8OAg6EixREGEhNEGDuaytb377ctKzgKqFw2IN8rxRvdA0sTckxgwtnuyMFuNAIa yHpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959850; x=1717564650; 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=nzOkK/6FwavJEbHE1R7du1oGmMgzpDdcDl3/igK8u5I=; b=FhsNLR0U2Iq9NO4uldpTgdIBgouQpTvOGvxz6s/xVmVPUAqkolRvNU8fai57sfJENI RXNOoDzv5XbuZ1/6gMelQ0NbSWF8EAeFy6CpovGs/7MrxwQ+pycLApHaflBXLdPqNjfD ayJiTJFOGy+vyx4emTgJDZ4R42M3Rxg91QOttMAcNOt3F5Sf7hVK/kBbU/sFWQv7kAvC Xudiih+w+LSTu34Bx/iPr93J0NWD9GWNvBX7i6OMDGcM7sNbkZM2YRMpxceLaLifwzRm vwdQYvETS8sPdH1ipoZtYL+tiLkt5JRECgIGH1uyMi4QB2Hw9R2nlivxvzuWoFVdG95X qf0A== X-Gm-Message-State: AOJu0Yz4BQviJvS1/Ff+0Pe2U3h2yhIUWUhnJNOfnwWlNpoCwmwBHhin GR/hn3+mu1B+eVvmT3GE387Sjr3z8hpesUeyo7UcIV7if3WX2j6RHxLRrn6CvFl/aIFm8X2lAs5 U X-Google-Smtp-Source: AGHT+IHxX4wY/S9en2UgCZU5eJYYV9pGwoaiUmKG1G+0cjysI7gMEPV4jb34EjFhVuJv7to6TO9XIQ== X-Received: by 2002:adf:a1c4:0:b0:355:3cf:49b1 with SMTP id ffacd0b85a97d-35526c6bce0mr8945244f8f.19.1716959850419; Tue, 28 May 2024 22:17:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f64f98sm194102775e9.24.2024.05.28.22.17.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 20/23] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Date: Wed, 29 May 2024 07:15:36 +0200 Message-ID: <20240529051539.71210-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov --- 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 0fa45aba8b..3d004a0818 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -228,8 +228,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`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (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 5d7bb4354b..2cbbd03cfd 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -925,7 +925,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 8e51d1f1bb..b84c8ddba0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -264,31 +264,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 1343fd93e7..217c749705 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) { @@ -827,17 +819,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 Wed May 29 05:15: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: 13677836 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BFC0C25B7C for ; Wed, 29 May 2024 05:19:28 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBgz-0004Go-Ci; Wed, 29 May 2024 01:17:41 -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 1sCBgx-00043t-VB for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:39 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBgv-0005Wh-Iz for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:39 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-354be94c874so1331577f8f.3 for ; Tue, 28 May 2024 22:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959856; x=1717564656; 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=iP6fxsGZMQuY/R3P1rynlKMgDKQeym4TwOSFHOfHWmw=; b=hNhA/2UcXj2owBqyM9UlrcQrl2AXgsiSibVnw+E5MlNHz9t3LJZEG/mXzbmgAKBUMd c1NL1vWU0sPLMck4SZ1vxcsxuErxbXPTyjsUGSp4nxGdgvx9PLiLt7b7gNzAtu/NOgkC B4uS33IBNWF82JS3OgtB+5RLj/wJ4G43OPKTiEddu5SciNjHVSNGzBCP1ht3+rusJbf6 FspfrqAk0RMI+UF10slccj9GIoeB3GAh/tOvr/6wc8Rv/guLLV69VcR3iueHl0fzOGUq 5HmUckg6jnislvVThumSRHSY4/Y8RFNhNIhV1kZQ6U1iZuXCRSgI77CHHHI18ufIDgG8 C1lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959856; x=1717564656; 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=iP6fxsGZMQuY/R3P1rynlKMgDKQeym4TwOSFHOfHWmw=; b=Kk17WcWT6BCb6KxCyC8S/TpUjClihOjonzc4pBE/v4uvQx/7IQlGbfB5AP/PefY7mP blJD7aJDqMsJfHCP3rOl20fOs4ChYUONOI/5Wd/I/sT/3qidv8snbQcdyCTPX+GGKZEj SXjk8NNEiCCODnrqzkWaeez/0ysayltyxcf7MHxR2VNGRqpElZMIGeLqcIvV2FYAT6Ze tLksWzdkJ0MjYcXz589CvE3xHnlg/vLgndj/iWyezHMyylI2xQ0HfTRxGNXCeS2SpwlU wm9FK6ulsLa68y2JAZopJyMoPFqNXImO2IT6Un3aoUl1il3M9wtIxXfwbS5VLYi0t1GR ya0Q== X-Gm-Message-State: AOJu0Yw9w2QGazH1G02XsL7AYGa7CAviNJP+kfM0wgL8lEdJHE4Wcm8t mr4fZ5jeQCw720qZIg178jlPmulHPmoWmHL3DdxRnqpPu0dUoYwdsZcsp6wU2zulMRqDedRyYMF B X-Google-Smtp-Source: AGHT+IHp7AEvzio9AoTUzxx9usWHXTl0IJhK6rgnk6S7Vc74KH/5MSsjGGlfLlkIiJH32S68uzlyqQ== X-Received: by 2002:a5d:5983:0:b0:359:b737:51e4 with SMTP id ffacd0b85a97d-359b73753dcmr8667678f8f.2.1716959855694; Tue, 28 May 2024 22:17:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421089ae981sm166974185e9.32.2024.05.28.22.17.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 21/23] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Date: Wed, 29 May 2024 07:15:37 +0200 Message-ID: <20240529051539.71210-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Last commit removed the last non-NULL use of DEFINE_I440FX_MACHINE 3rd parameter. 'compatfn' is now obsolete, remove it. Suggested-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Daniel P. Berrangé --- hw/i386/pc_piix.c | 62 ++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 217c749705..e7f51a5f2c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -452,13 +452,9 @@ static void pc_xen_hvm_init(MachineState *machine) } #endif -#define DEFINE_I440FX_MACHINE(suffix, name, compatfn, optionfn) \ +#define DEFINE_I440FX_MACHINE(suffix, name, optionfn) \ static void pc_init_##suffix(MachineState *machine) \ { \ - void (*compat)(MachineState *m) = (compatfn); \ - if (compat) { \ - compat(machine); \ - } \ pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \ } \ DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) @@ -496,7 +492,7 @@ static void pc_i440fx_9_1_machine_options(MachineClass *m) m->is_default = true; } -DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", NULL, +DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", pc_i440fx_9_1_machine_options); static void pc_i440fx_9_0_machine_options(MachineClass *m) @@ -512,7 +508,7 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m) pcmc->isa_bios_alias = false; } -DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", NULL, +DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", pc_i440fx_9_0_machine_options); static void pc_i440fx_8_2_machine_options(MachineClass *m) @@ -527,7 +523,7 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; } -DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", NULL, +DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", pc_i440fx_8_2_machine_options); static void pc_i440fx_8_1_machine_options(MachineClass *m) @@ -541,7 +537,7 @@ static void pc_i440fx_8_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len); } -DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", NULL, +DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", pc_i440fx_8_1_machine_options); static void pc_i440fx_8_0_machine_options(MachineClass *m) @@ -556,7 +552,7 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; } -DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", NULL, +DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", pc_i440fx_8_0_machine_options); static void pc_i440fx_7_2_machine_options(MachineClass *m) @@ -566,7 +562,7 @@ static void pc_i440fx_7_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len); } -DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", NULL, +DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", pc_i440fx_7_2_machine_options); static void pc_i440fx_7_1_machine_options(MachineClass *m) @@ -576,7 +572,7 @@ static void pc_i440fx_7_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len); } -DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", NULL, +DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", pc_i440fx_7_1_machine_options); static void pc_i440fx_7_0_machine_options(MachineClass *m) @@ -588,7 +584,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); } -DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL, +DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", pc_i440fx_7_0_machine_options); static void pc_i440fx_6_2_machine_options(MachineClass *m) @@ -598,7 +594,7 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } -DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL, +DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", pc_i440fx_6_2_machine_options); static void pc_i440fx_6_1_machine_options(MachineClass *m) @@ -609,7 +605,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m) m->smp_props.prefer_sockets = true; } -DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL, +DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", pc_i440fx_6_1_machine_options); static void pc_i440fx_6_0_machine_options(MachineClass *m) @@ -619,7 +615,7 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } -DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", NULL, +DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", pc_i440fx_6_0_machine_options); static void pc_i440fx_5_2_machine_options(MachineClass *m) @@ -629,7 +625,7 @@ static void pc_i440fx_5_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } -DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", NULL, +DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", pc_i440fx_5_2_machine_options); static void pc_i440fx_5_1_machine_options(MachineClass *m) @@ -643,7 +639,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m) pcmc->pci_root_uid = 1; } -DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL, +DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", pc_i440fx_5_1_machine_options); static void pc_i440fx_5_0_machine_options(MachineClass *m) @@ -655,7 +651,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) m->auto_enable_numa_with_memdev = false; } -DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL, +DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", pc_i440fx_5_0_machine_options); static void pc_i440fx_4_2_machine_options(MachineClass *m) @@ -665,7 +661,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } -DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", NULL, +DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", pc_i440fx_4_2_machine_options); static void pc_i440fx_4_1_machine_options(MachineClass *m) @@ -675,7 +671,7 @@ static void pc_i440fx_4_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } -DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", NULL, +DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", pc_i440fx_4_1_machine_options); static void pc_i440fx_4_0_machine_options(MachineClass *m) @@ -687,7 +683,7 @@ static void pc_i440fx_4_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); } -DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", NULL, +DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", pc_i440fx_4_0_machine_options); static void pc_i440fx_3_1_machine_options(MachineClass *m) @@ -701,7 +697,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); } -DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL, +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", pc_i440fx_3_1_machine_options); static void pc_i440fx_3_0_machine_options(MachineClass *m) @@ -711,7 +707,7 @@ static void pc_i440fx_3_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len); } -DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL, +DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", pc_i440fx_3_0_machine_options); static void pc_i440fx_2_12_machine_options(MachineClass *m) @@ -722,7 +718,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } -DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", NULL, +DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", pc_i440fx_2_12_machine_options); static void pc_i440fx_2_11_machine_options(MachineClass *m) @@ -732,7 +728,7 @@ static void pc_i440fx_2_11_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } -DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", NULL, +DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", pc_i440fx_2_11_machine_options); static void pc_i440fx_2_10_machine_options(MachineClass *m) @@ -743,7 +739,7 @@ static void pc_i440fx_2_10_machine_options(MachineClass *m) m->auto_enable_numa_with_memhp = false; } -DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", NULL, +DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", pc_i440fx_2_10_machine_options); static void pc_i440fx_2_9_machine_options(MachineClass *m) @@ -753,7 +749,7 @@ static void pc_i440fx_2_9_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len); } -DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", NULL, +DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", pc_i440fx_2_9_machine_options); static void pc_i440fx_2_8_machine_options(MachineClass *m) @@ -763,7 +759,7 @@ static void pc_i440fx_2_8_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } -DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", NULL, +DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", pc_i440fx_2_8_machine_options); static void pc_i440fx_2_7_machine_options(MachineClass *m) @@ -773,7 +769,7 @@ static void pc_i440fx_2_7_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); } -DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", NULL, +DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", pc_i440fx_2_7_machine_options); static void pc_i440fx_2_6_machine_options(MachineClass *m) @@ -788,7 +784,7 @@ static void pc_i440fx_2_6_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); } -DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL, +DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", pc_i440fx_2_6_machine_options); static void pc_i440fx_2_5_machine_options(MachineClass *m) @@ -802,7 +798,7 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); } -DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL, +DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", pc_i440fx_2_5_machine_options); static void pc_i440fx_2_4_machine_options(MachineClass *m) @@ -816,7 +812,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); } -DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, +DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", pc_i440fx_2_4_machine_options) #ifdef CONFIG_ISAPC From patchwork Wed May 29 05:15: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: 13677832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CAC2C25B75 for ; Wed, 29 May 2024 05:18:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBh5-0004cD-55; Wed, 29 May 2024 01:17:47 -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 1sCBh3-0004YK-5m for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:45 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBh1-0005Wz-2H for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:44 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-354be94c874so1331612f8f.3 for ; Tue, 28 May 2024 22:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959861; x=1717564661; 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=uz6s05/IrF+4uE8X51O0iRSZz1ji8UGQu3fhLSYvF+k=; b=t7JArrjzogm33zgqr769FSyva4zPzEmrMkm/sgu7FQ127JXHTQtRjzNerYHQRlhca7 GQVpvK/1AiYfm8HedKBIe73z7UhEw/3X3Eok332ajgHlYAf0Y26nS94bNnpq+vS889PY oURxG+gdn6nB3b6J7m7lOTd5jick3AAFBk5JcXEj9f6q4Eqc813xVIFmnLsKeK2T2RNZ fr+NB0kXt2X99AJnNTNuhchuXCAEyZ0uWI62P95wgSzl1S4d392BTkR5ntAxSSYrvWSh IhGzPyBCuGMVk+xZs/piJygPDC3c7SSZvOTRpbnNoOsrlZjOYC3J4+uH/EWMSX7yEzMX CA7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959861; x=1717564661; 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=uz6s05/IrF+4uE8X51O0iRSZz1ji8UGQu3fhLSYvF+k=; b=RNyT2a7l0ksdol9hhsYX70tMdQozaE4QnB1jlAls7Y3nbD041MDtt29O6G7tVt5YOI Q7mqHmZQlQbD3S2r0nbEGPZQs5yZHAdcmlZgUnPIFATVkvaG+BHAJV/TU0M/RaqPQsK3 bU0gZ9znnFHAqYpTp1QSjy4GTnLHmbq/ay5WE2NlSxWNrykWwY0y3rAyBEcTGe2hfav9 PNXTCFSywL6Y7SrtNjMTqpNLOuHpFx6X0UfEz6uuGb4h/OiHl4GXBl72cNZH6WkVferp 4RyFyDC62ayUKDr8ogMHIUEFW7tpcm6xAttNOdozBRm0sqqwSgRjcE4MM5uPgR+vTNyx VJGA== X-Gm-Message-State: AOJu0YyatrOFv9lWswhKosM7i1u6LGJj0AsE1nevSqmhxjo5dFQICXqp CLRI/7OfTdr+E2BpqqRaH+weGG9lmvLcR9xde63DJI369cHqzOD80UMXM5iPDiKtgmMS07Gg5ed j X-Google-Smtp-Source: AGHT+IG0ySZC/pv/nLs3SNQ87eN+be+Rr7ZWh1qgBiEZ5EiNqxPms9B033n0H8AwsKFJesiQRDnrQg== X-Received: by 2002:a5d:500b:0:b0:354:f308:7cf2 with SMTP id ffacd0b85a97d-3552fdc430dmr15155584f8f.50.1716959861014; Tue, 28 May 2024 22:17:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a09031esm13608645f8f.49.2024.05.28.22.17.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 22/23] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Wed, 29 May 2024 07:15:38 +0200 Message-ID: <20240529051539.71210-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Thomas Huth --- 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 c64ef0c1a2..6951f48f86 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2059,9 +2059,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 bc2dceb647..2d972def64 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8253,8 +8253,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 6c864e4611..51bd9556f6 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4391,6 +4391,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()) { @@ -4405,12 +4406,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 Wed May 29 05:15: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: 13677835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB4C8C25B75 for ; Wed, 29 May 2024 05:19:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCBh9-0004fu-2G; Wed, 29 May 2024 01:17:51 -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 1sCBh7-0004fD-ML for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:49 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCBh6-0005XE-1B for qemu-devel@nongnu.org; Wed, 29 May 2024 01:17:49 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-421124a04d6so14359515e9.3 for ; Tue, 28 May 2024 22:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716959866; x=1717564666; 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=TaCMC4VTA5PCDTdrs4hE3YwemLrOkKOiTKlVZvMNghk=; b=wGBfBDN3rbrwV0HALvcTPXojytKqtM2y4GfYmpSNuoDJnaJKENURYvs5t2XIVK/MZQ iXBZCeAZKit7CNdExoixvC6ioKhCMoQwNURKVFnCt49tLJdZ59olzNw9vcl+5cr19+xL 120IfBK+868qkkMBb9z14tWabzFpUQPQcThU9RzYw2azVWHLSoHSA0Sd1cM3rxEf76Mf 5HtR8c6NglSm1L8YmIV3EBsJILDU68GzfF8NUzNxUqn2Ezx6z93zkwDrCmeOsMLuK1gb nxKiXtBor5bBdHQNzBgU9JbmsSKdK9r4d5zPW2iDRRptcu1ka9u8Ef4TIFkdbQTOjyAq UVEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716959866; x=1717564666; 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=TaCMC4VTA5PCDTdrs4hE3YwemLrOkKOiTKlVZvMNghk=; b=VCH9ukdobzTAAcKoQjBNL1c+TUkKUpZLjfSQF8f9x+HRexvci+Lk7F38xbmAQkcxa4 t0mlVVT28tsH0aRZHUG00Xh2lFbrxAtYitGyYbSTSOb9H29janN806Dr5lOcCrqjCUJ5 XyeHIvTe+N5S29aUvbj5IBivWi7WC2WqD/H2lTawQiNNJKhUSuHlNIcRKogsOCC1ArDn 5+nke59FPvqUsq6K8IWzcjHtxA1UXVtu2aakMqqS8k8DGUTua2uyHEq2fgGX6ZiiUm1v tFgU2WjmMduUNIvN7dBMWjeH2mr5qZBocm1XQ6z9tLN83J+z9T8HBZYUGwPuu5vDe479 ckPA== X-Gm-Message-State: AOJu0YwOOdat6ULv1aRMm/N8zPdz6q8ZtrhXGbRodqcq5zjTIKOIzNfQ Ama7rYfhf9PAICtnixomcMR2PoEiqm6dqmjPCqZjb3c5qqMlJTPZVmCBkjeKJy3xGpKzaQTFb4d s X-Google-Smtp-Source: AGHT+IHwyLFnd1TLe8yRdF97RHd5f++rHUDlRWmZ2JGjfdY5NgvJoIy/zibixwWuIsshHwmc9c4f4Q== X-Received: by 2002:a05:600c:1387:b0:420:e88b:6fb3 with SMTP id 5b1f17b1804b1-42108964ad6mr99647425e9.0.1716959866263; Tue, 28 May 2024 22:17:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.204.141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100fb9042sm199630475e9.39.2024.05.28.22.17.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 May 2024 22:17:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH v5 23/23] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Wed, 29 May 2024 07:15:39 +0200 Message-ID: <20240529051539.71210-24-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529051539.71210-1-philmd@linaro.org> References: <20240529051539.71210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Reviewed-by: Zhao Liu --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- hw/i386/pc_piix.c | 7 ------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 63568eb9e9..db26368ace 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 b84c8ddba0..9dca3f0354 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -264,6 +264,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; @@ -645,8 +655,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") || @@ -980,8 +989,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++) { @@ -1737,9 +1745,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; pcmc->isa_bios_alias = 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; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e7f51a5f2c..e4930b7f48 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -414,13 +414,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) pcms->south_bridge = PCSouthBridgeOption_lookup.array[value]; } -/* Looking for a pc_compat_2_4() function? It doesn't exist. - * pc_compat_*() functions that run on machine-init time and - * change global QEMU state are deprecated. Please don't create - * one, and implement any pc-*-2.4 (and newer) compat code in - * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). - */ - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) {