From patchwork Tue Mar 5 13:42:03 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: 13582442 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 02227C54E41 for ; Tue, 5 Mar 2024 13:43:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV41-0002GR-A4; Tue, 05 Mar 2024 08:42:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV3z-0002GG-LN for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:35 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV3x-0003wf-Nx for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:35 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-563cb3ba9daso7116142a12.3 for ; Tue, 05 Mar 2024 05:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646152; x=1710250952; 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=OMNfTRI2EEqDMvR5k42GTJ+bmKNe3TP93rxFG8a8RHU=; b=HcvLfv4h61iil8IVPcuoBVWXXI4zftOw87dr5pactiElGnVGPoeZAYiyvsx8o9tKvH zBXUOz7cAF6qUP+VdUHtKpYJXgqmaOwtXFjDYQwTSfwiYqbP6ueRGZj+J6a4jqPPtG/Z q6icE8MTjjKEzI4QB/BVUP/JzMFmj8h90wIWQrPIm6l7s9IhJ6QN8zA9Y23ZRjKuGHM/ clhHeSCpG0mSMLHpOKvwXYEipSEbWslrMF6E21TcMEjYJB9B6VfTXL8eKMDPuezHeOdR TRYUsggg/SIIt/vCEuCU12E70sVGSqh3++dPd+XKL+MDHGgmwqhohU1D606eqIYEDSPG 3ndA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646152; x=1710250952; 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=OMNfTRI2EEqDMvR5k42GTJ+bmKNe3TP93rxFG8a8RHU=; b=YbCQRouUtRUDyh9H6DlsNRVTM5zCJJN5fjcmtOyHRKy5R1j2KpEc0an1sR9ONqjB+C 1MuUr1sNwjQxARjHOuz9ka1QqX+O4E6lhRJ60QV0hgthh/qD4Wk/3xqyJk6rab7nlNB8 ZHAvMPbreNKMwisgIS7jMfDxYC0VUPb7ZMnDwMywrUc3fEgOoUwXOBdxBGdvk6OAam8n xhkDQLUUzJ+XtaxqoG9e1jjz0EwE4vf8IUV/9FjlI+9p2VeOJmc7rs2uXFVwgT4/E9GT HTxm9hYECbILPb2QVxhE20WSo28OGpGKM7q5yZN9VtDR4qhRCT9MmAixcLyj/DyuCaNe xDjQ== X-Gm-Message-State: AOJu0Yw6qAJDss8gCO8e2UqtiSulUxZq3Skw/zY3ng3ivyZ/lsj7Heod ulfOEhwXF2hf5c7K4h2P3/juz8k44StuMIdP7htzDt9YyMyhvunB35yzTQcmOpGU4DZDpMv+ixE h X-Google-Smtp-Source: AGHT+IG1q9HaAJ/qhvQerM8geumyfDRonf6wnB9tKhRLsDqaklXBgRR2dzeyq17BLhnoyQtqTJ+6sw== X-Received: by 2002:a05:6402:5189:b0:567:26dd:d403 with SMTP id q9-20020a056402518900b0056726ddd403mr6223181edd.17.1709646152145; Tue, 05 Mar 2024 05:42:32 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id i1-20020a0564020f0100b00567afe29709sm215237eda.78.2024.03.05.05.42.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:42:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 01/18] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Date: Tue, 5 Mar 2024 14:42:03 +0100 Message-ID: <20240305134221.30924-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 --- 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 8565644da6..6d4738ca20 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -221,7 +221,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) +``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''' 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 417a0e4fa1..156737989e 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -801,7 +801,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 b958023187..3360ca2307 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -285,9 +285,6 @@ extern const size_t pc_compat_2_2_len; extern GlobalProperty pc_compat_2_1[]; extern const size_t pc_compat_2_1_len; -extern GlobalProperty pc_compat_2_0[]; -extern const size_t pc_compat_2_0_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f5ff970acf..bb7ef31af2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -311,21 +311,6 @@ GlobalProperty pc_compat_2_1[] = { }; const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); -GlobalProperty pc_compat_2_0[] = { - PC_CPU_MODEL_IDS("2.0.0") - { "virtio-scsi-pci", "any_layout", "off" }, - { "PIIX4_PM", "memory-hotplug-support", "off" }, - { "apic", "version", "0x11" }, - { "nec-usb-xhci", "superspeed-ports-first", "off" }, - { "nec-usb-xhci", "force-pcie-endcap", "on" }, - { "pci-serial", "prog_if", "0" }, - { "pci-serial-2x", "prog_if", "0" }, - { "pci-serial-4x", "prog_if", "0" }, - { "virtio-net-pci", "guest_announce", "off" }, - { "ICH9-LPC", "memory-hotplug-support", "off" }, -}; -const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index fa5f93f99f..594b131625 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) { @@ -868,38 +863,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, pc_i440fx_2_1_machine_options); -static void pc_i440fx_2_0_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_1_machine_options(m); - m->hw_version = "2.0.0"; - compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len); - pcmc->smbios_legacy_mode = true; - pcmc->has_reserved_memory = false; - /* This value depends on the actual DSDT and SSDT compiled into - * the source QEMU; unfortunately it depends on the binary and - * not on the machine type, so we cannot make pc-i440fx-1.7 work on - * both QEMU 1.7 and QEMU 2.0. - * - * Large variations cause migration to fail for more than one - * consecutive value of the "-smp" maxcpus option. - * - * For small variations of the kind caused by different iasl versions, - * the 4k rounding usually leaves slack. However, there could be still - * one or two values that break. For QEMU 1.7 and QEMU 2.0 the - * slack is only ~10 bytes before one "-smp maxcpus" value breaks! - * - * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on - * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418. - */ - pcmc->legacy_acpi_table_size = 6652; - pcmc->acpi_data_size = 0x10000; -} - -DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn, - pc_i440fx_2_0_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Mar 5 13:42:04 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: 13582441 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 E7415C54798 for ; Tue, 5 Mar 2024 13:43:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV4D-0002HV-1Z; Tue, 05 Mar 2024 08:42:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV47-0002Gu-BF for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:43 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV44-0003x9-UE for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:42 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a449c5411e1so543230066b.1 for ; Tue, 05 Mar 2024 05:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646159; x=1710250959; 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=nBiR1NjnNqmb5fA74myd/4THTKWykiIDh39Z8PAr++Y=; b=FSr2RCh4x5HmShFmZC3b06ows7xsPX68WCP/qtDNfql118456xkSkAmOtD+lbCbh3s 0FEqhCJSXWAVJ4FvI/HbzzxNj+NgTkzEn9DxyiYpYoaknR22bGVUpp3vGRGYmr4UBJWh TppkWnLyt/r34hJnKxubp0tQynzf7Bk50rhBQf8Mtp7oj8yIyoDXWlHUiPna17rJI27m XhWbhkRFLcULJs8LcK+i9juG/yN2NMOFVngyoPt/Mion59CopuiA45Xo2ZM53U+ceflH VxoLnLq5oA90aEHB1WCwr1WWIQafgVXFgSoJC1k7s0KvIc378nCmryRqgWwHPkFSNiwu X8Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646159; x=1710250959; 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=nBiR1NjnNqmb5fA74myd/4THTKWykiIDh39Z8PAr++Y=; b=aHlkbhxwsfVG9Md88Hqv9xXQadQMyn7YChp9+NJD42TwB2iBCI6QurF3OdY1dy/WOx O9yrmRFWzYg2NBvyCHxjn+oFOeGtrdqZ0cjkJxGm8Q7ioJuZuWB+d8e+cCcWA2b+AF0+ 9Fw6q93aKBNXX04/cHi9aEiYi97Ni0N05I5YdzMc6f2QmBGQ47Fa9GJMWmfOTchicsvC tHOoXYOxCC6shEiMFvBtc7I0l/guxEhYX6ENvBdu/TnuvdHESfgoOZiNJ5hc/gORMQOP EbFQcfyfziNt75UqL8kD74vjE6VHpdlOthu25CNrF2onaLdV5PuyYvZQN15o40C/aISs xzMg== X-Gm-Message-State: AOJu0YyOyg1wvFfcy0tc6Ny6D8cymybNJ4jBMx/U7KnK4nn0kCKouZPM t15aXGZXvTrHHBwQLsn0rPsyZmXAIlFM3lxheu/Y942IskaBCjJzIqTMhC9eN7K5/R12lnZQ6kZ K X-Google-Smtp-Source: AGHT+IGlCzBdHb/CuP3L39CooS3sdPaa/BoyfCLBRe8pyO7DyPl6RRC6hDIlmTp4c2pez14Nn4jddw== X-Received: by 2002:a17:906:830e:b0:a45:446c:6beb with SMTP id j14-20020a170906830e00b00a45446c6bebmr4144176ejx.50.1709646158911; Tue, 05 Mar 2024 05:42:38 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id f27-20020a170906085b00b00a44ef54b6b6sm3648391ejd.58.2024.03.05.05.42.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:42:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 02/18] hw/usb/hcd-xhci: Enumerate xhci_flags setting values Date: Tue, 5 Mar 2024 14:42:04 +0100 Message-ID: <20240305134221.30924-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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_flags are used as bits for QOM properties, expected to be somehow stable (external interface). Explicit their values so removing any enum doesn't modify the other ones. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 98f598382a..37f0d2e43b 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -37,8 +37,8 @@ typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_FORCE_PCIE_ENDCAP, - XHCI_FLAG_ENABLE_STREAMS, + XHCI_FLAG_FORCE_PCIE_ENDCAP = 2, + XHCI_FLAG_ENABLE_STREAMS = 3, }; typedef enum TRBType { From patchwork Tue Mar 5 13:42:05 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: 13582450 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 23604C54E41 for ; Tue, 5 Mar 2024 13:46:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV4I-0002IE-F3; Tue, 05 Mar 2024 08:42:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4D-0002Hc-44 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:49 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4B-0003xW-KY for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:48 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5672afabb86so2435137a12.3 for ; Tue, 05 Mar 2024 05:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646165; x=1710250965; 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=puZvfwYJmiovgLIksxQYRb4sHK5AG83t9xnfOfq3iqY=; b=HSpWkdqyGFJKHINUIW7eFXs7a66cMOiEOPPy84vFPRtBbgduO99yYNxn21plDKluQc vemnaMFR5hM6X6oHdgajtbBt5Cra5UULw7AoLB+lTUANdoOEE42SM92irlV65zV3Vo9s /yLWANlqM4MjJGIcu8krpD+IWJoNmxCXl1m/RmNx71m0aHT+m2IKO/wsEn+dr5OVhmha kzKg4RQVvRlDOX+U7DyXh7qZq0fkzSRS6C2d5ZzfZOBKD5Y6MlYAM4lQcEnnnNYk2fjR i/FdzM4EAagqAk5S3La10L03LhT6DnRsrX2XFPKMVyGhc1KkdIHvdyQYUhY2SuFihb+d YLRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646165; x=1710250965; 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=puZvfwYJmiovgLIksxQYRb4sHK5AG83t9xnfOfq3iqY=; b=Hovz0/llDDIh/BOWPquh8D1qKHtWjSYf0B7BA6jv1MH9i7DtVtmK6Iu3hm5i+Xl9IK w9j5yJmLkQQ7VVffDK2/kQtbLbHnrT4s2wtLn/+nPPCcnlerYQrs8360BjdN3iU3acb5 FsdCEdAbQKcSVqPi8k8BbC3C0kLRI0rw2jV74QehfZpeFLiRTuDVNeBk3+MZK8vMrTAZ wdzqew4s5BSUvksh+EbLdyqyLUbK8czlwS2o78JDyoUV0y6CleqRw/FUFvClZUPKQMXn WqCK9ZlaNySSleSclwTW/lnmgKy1+OHBleDUS2pfcZH9xeAA9TyXHzR+Gg7zmeA/HPL9 8pvw== X-Gm-Message-State: AOJu0YxS6L+5jeksRcSuEtLmM3lWJlZ2AKKrxv3x0rzdhUR3yDFg0Wd4 +W84/KV9T7Iionf90xdqJmGjAi0F2+opsl020lhGadvD+n3o1mfr/cBJ7J91ki5bVXoMyh+6L5N o X-Google-Smtp-Source: AGHT+IGoQLz3vb/hw5i2C2mEhP7oyJ2WOykEYWfKelOzXGkQ9Oyr76XV3KVkqIMUEC1WspvOGAtlkw== X-Received: by 2002:aa7:cb0b:0:b0:564:dd13:56e9 with SMTP id s11-20020aa7cb0b000000b00564dd1356e9mr8683560edt.29.1709646165626; Tue, 05 Mar 2024 05:42:45 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id z42-20020a509e2d000000b005669d904871sm6107335ede.49.2024.03.05.05.42.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:42:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 03/18] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Tue, 5 Mar 2024 14:42:05 +0100 Message-ID: <20240305134221.30924-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- 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 37f0d2e43b..7dcab8b8db 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 = 2, XHCI_FLAG_ENABLE_STREAMS = 3, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 328e5bfe7c..5d5b069cf9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, XHCI_FLAG_SS_FIRST, true), - DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags, - XHCI_FLAG_FORCE_PCIE_ENDCAP, false), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index 4423983308..cbad96f393 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_MEM_TYPE_64, &s->xhci.mem); - if (pci_bus_is_express(pci_get_bus(dev)) || - xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) { + if (pci_bus_is_express(pci_get_bus(dev))) { ret = pcie_endpoint_cap_init(dev, 0xa0); assert(ret > 0); } From patchwork Tue Mar 5 13:42:06 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: 13582453 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 E9DBFC54E49 for ; Tue, 5 Mar 2024 13:47:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV4N-0002LO-6k; Tue, 05 Mar 2024 08:42:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4L-0002Iz-6U for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:57 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4I-0003xq-Bl for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:42:56 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a4515f8e13cso300481366b.3 for ; Tue, 05 Mar 2024 05:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646172; x=1710250972; 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=dfW77RB2c7k3ZDXHGh05HNMU3UcmTeaypC3Kdgt/4jc=; b=xvYCr4HsxxUrkL8jBRws5q9gtDMENVYTIP7o8/kYbxcNx2obmsU1OXyrI5g1RpOM4h ZV3o/pC1U7TeCnY2CV/SWkJmrZlE3zdpwJe1lxLkLpOjXXAyWmB8yQb5kGp3/AIFIubN 7xNoPfg+II1OHSgQSUdYWLC5v8FTKvm9KlTdHOaQ7pp8hPZ7Nd6nNByPAPomCajdTk0x G/gFcm8gctnXZitVCCDNlcZcOa5FJ83ndk9MpGCrJ0new4H40oqKQD3qtAeDRo5rMJ/W KtyaNC9YCOdzs/Hky06EjVFAbQM54tVfXJZZ3TnR2CssvZNZjgLWZ3XbCCSi4pLwrwFL hKow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646172; x=1710250972; 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=dfW77RB2c7k3ZDXHGh05HNMU3UcmTeaypC3Kdgt/4jc=; b=URusT0XYOCLhrH8WX0OazFw7R9YnxnvuzEZ8NOP4AXytvSQS7nZjH+T597xubKpYOQ 6IXHDLwiim53QkRr04AfkhDjqCj9sE3AhUOJKo7FFQ6Cw0kc+osHjzMEMk7HhI9J+ID/ fZK5KcHz5W24Kj/dskE5kZprJBarxidB7ytjYhZN+dsAk/YWtz5QE97ytP1iDGlqDJYN cwBXyomD7cMBDPMIlWnCrESBW3wHmGIkprDKyyyWAzfCZiyRZ+ajuBBlpm+ZfrMR40h/ HapStmnzYoGClsGRe21K8gwirRDr9CkhHpB5f0H8ttL3C/F8Jm034sg6zGQbx/OifbTt 5H9g== X-Gm-Message-State: AOJu0YxHvrgVKMfZCZ64in4/S0nwGj91DtP6akqYgbWf00J80Xj4F09C Htn+z8qSuAgs/HPBjpC3T85jaFD+VywcKecpSWbN5ggFWU5u1cxiWu1ssKuLhWnqaRbn46ozj7P Q X-Google-Smtp-Source: AGHT+IFHUEUkZWZFlVXOVF2NKxZ+5If4reUQf8Sy4TYxGOUAHFlet0qWjxsTML0lIIl8M8UOzNFzsA== X-Received: by 2002:a17:906:378b:b0:a44:90b3:aa3b with SMTP id n11-20020a170906378b00b00a4490b3aa3bmr8825793ejc.11.1709646172215; Tue, 05 Mar 2024 05:42:52 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id tj10-20020a170907c24a00b00a4452ed413asm5859830ejc.16.2024.03.05.05.42.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:42:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 04/18] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Tue, 5 Mar 2024 14:42:06 +0100 Message-ID: <20240305134221.30924-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 8 insertions(+), 38 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 7dcab8b8db..051ea43261 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -36,7 +36,6 @@ typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { - XHCI_FLAG_SS_FIRST = 1, XHCI_FLAG_ENABLE_STREAMS = 3, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 5d5b069cf9..0c063b3697 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,8 +41,6 @@ struct XHCINecState { static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, - XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index cbad96f393..264d7ebb77 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix = ON_OFF_AUTO_AUTO; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; - xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } static const TypeInfo qemu_xhci_info = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ad40232eb6..b6411f0bda 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport) case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index + xhci->numports_3; - } else { - index = uport->index; - } + index = uport->index + xhci->numports_3; break; case USB_SPEED_SUPER: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index; - } else { - index = uport->index + xhci->numports_2; - } + index = uport->index; break; default: return NULL; @@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x28: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_2<<8) | (xhci->numports_3+1); - } else { - ret = (xhci->numports_2<<8) | 1; - } + ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1); break; case 0x2c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x38: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_3<<8) | 1; - } else { - ret = (xhci->numports_3<<8) | (xhci->numports_2+1); - } + ret = (xhci->numports_3 << 8) | 1; break; case 0x3c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci) for (i = 0; i < usbports; i++) { speedmask = 0; if (i < xhci->numports_2) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i + xhci->numports_3]; - port->portnr = i + 1 + xhci->numports_3; - } else { - port = &xhci->ports[i]; - port->portnr = i + 1; - } + port = &xhci->ports[i + xhci->numports_3]; + port->portnr = i + 1 + xhci->numports_3; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_LOW | @@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci) speedmask |= port->speedmask; } if (i < xhci->numports_3) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i]; - port->portnr = i + 1; - } else { - port = &xhci->ports[i + xhci->numports_2]; - port->portnr = i + 1 + xhci->numports_2; - } + port = &xhci->ports[i]; + port->portnr = i + 1; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); From patchwork Tue Mar 5 13:42:07 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: 13582443 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 483EEC54798 for ; Tue, 5 Mar 2024 13:43:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV4U-0002jr-Jj; Tue, 05 Mar 2024 08:43:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4S-0002aY-B6 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:04 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4P-0003yW-A2 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:04 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5640fef9fa6so6950009a12.0 for ; Tue, 05 Mar 2024 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646179; x=1710250979; 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=P6j3vsQkgHjlqXgYSK7hYcuXtUupY0HchuWejne43RQ=; b=dhSqQ6LoHh4QuI+bffRHfh7C1C2+AiLKLlWfzbEhvHwMrKmyVfl00LvnHRoskau7x7 zrx8+BqoxSflO1vZrMzpzNU6ND4Q55nqkwvOrDlXuUJhL7LesO9f8rKWaBMlr0GlfptL AhtobSl056e8Cc+ILNQsV41XcbuIk0osAeRsh2WakS2LFBUywBSj6mrCjP/MdzgLo24H 51+ZhweWKM/2JFODGi+Nd7C0zM07Ufr9+Cwg0+wJ1ZfOgnd1CEO7JLaWqRb1Sqc+iIc+ kF3T4Dgbw02NugXq26vOJ+Fzp29I7WtT6fgb3AUIUxCLuFzafgXXIINGpPRxzyyCDt2U yf4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646179; x=1710250979; 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=P6j3vsQkgHjlqXgYSK7hYcuXtUupY0HchuWejne43RQ=; b=ti97BeOQsAoDbcc82xxq1N15DRTWb6VLfG/o2Jw6qX6qK/T+012/xbTnHL7yKZ8pLy CPyOGHEfeKCa0Tb7nq5Rg25yZgfak+NJ4C5OQB2PORIissyjo8WLGWqbAiVHkYLjG/SI CT56w2DQt10UiuKTslKQJm4arR2ZcmTu4jpul568ABX+buYpRswRNxVAVVLb82mR1qXC d7rJZ+tom0Hi8GOZSI/C38LMsqAEZfibL9+1EFJ6CLAeNLuDxj36P6qcC7oUN/NaRNML Q70i3E0j7E51mK2q3xyP40Qt5LAK+37TdG4H13lmuIv9sbCQVg1jouVetpIDxTGLAzYW eVGA== X-Gm-Message-State: AOJu0YyBNN9Qy8uC/wdnK+EHomGRDTj336xl4BZeeDyJ7PXw1HXxyrxV yCiBCi4XTgD14NoefgF1hkjMPUmEF6VDsweE3auJpltW6KeHlNyoBXBxNGiUBOPc0a158o3e+jv y X-Google-Smtp-Source: AGHT+IFbWNyURA+FceZTD6yItwbOnb08ix3nn/dgtrYLs3f5Fy0iPr8irxrkPsFNRKIP2au/om3Y3Q== X-Received: by 2002:a05:6402:2152:b0:566:ef8:a81a with SMTP id bq18-20020a056402215200b005660ef8a81amr9346231edb.7.1709646179007; Tue, 05 Mar 2024 05:42:59 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id ev16-20020a056402541000b0055d333a0584sm5846620edb.72.2024.03.05.05.42.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:42:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 05/18] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Tue, 5 Mar 2024 14:42:07 +0100 Message-ID: <20240305134221.30924-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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é --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 60 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 3360ca2307..758d670a36 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 15242b9096..8c7fad92e9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2496,13 +2496,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; @@ -2548,19 +2547,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, @@ -2691,49 +2683,21 @@ 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. + * combinations. * * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. */ - if (pcmc->legacy_acpi_table_size) { - /* Subtracting aml_len gives the size of fixed tables. Then add the - * size of the PIIX4 DSDT/SSDT in QEMU 2.0. - */ - int legacy_aml_len = - pcmc->legacy_acpi_table_size + - ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit; - int legacy_table_size = - ROUND_UP(tables_blob->len - aml_len + legacy_aml_len, - ACPI_BUILD_ALIGN_SIZE); - if ((tables_blob->len > legacy_table_size) && - !pcmc->resizable_acpi_blob) { - /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, legacy_table_size); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - g_array_set_size(tables_blob, legacy_table_size); - } else { - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); + /* Make sure we have a buffer in case we need to resize the tables. */ + if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && + !pcmc->resizable_acpi_blob) { + /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges.\n"); } + acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); From patchwork Tue Mar 5 13:42:08 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: 13582444 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 4AD3DC54E41 for ; Tue, 5 Mar 2024 13:43:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV4k-00030f-3Z; Tue, 05 Mar 2024 08:43:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4Z-0002tS-E4 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:13 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4W-0003z4-H4 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:10 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5658082d2c4so7796380a12.1 for ; Tue, 05 Mar 2024 05:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646186; x=1710250986; 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=qNCIUOXAP5nkn1WP2t/PEPvMd4mRhcnbtnDDAPAoHAk=; b=vzdIlLVG4/Gb0VCRkVcAgnnMFrRnIbBtoiiPAR2hblHECG8jPVF5KDAX79vAJrWcd5 HB9jvoFmcxFapPUetdHLB+05RqeZAYd3rSTkc0tZxrhjdq5gAGcyMMl+Vt984Is47x56 curpDXnCSwW9GNMMYxTGj4OL9qc3vsU5Or0eVIedHSBl8wZcA7G7HO2nJbR0G1xJ6Z61 FN/SDngg645+mi3+4+KZbTnrXlJeffGGwGtXjvqgqgGUbsGApSkHTLcH9badmsdiiG7j j4y1D2p6Y9Q5QtyWPUBkAwYCVqmjnNRKvIkeLWflcPqhoQ3KJTInIBkuJZy9DsEAj2g4 comg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646186; x=1710250986; 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=qNCIUOXAP5nkn1WP2t/PEPvMd4mRhcnbtnDDAPAoHAk=; b=T+JkrDd21Wjr3ULXDaYrD0Jn0r2wr9BRQKFYzs2rpc9WbR/LIDYTWl0j1hgYpjZgcm 0Pha/YvrH8LVkCCSox19ACWQPUIKad8JibBjARCltGyLFQnL8sDrwYy00q+86FGFZpUS bjL2FqghNl6F21hlwEDENNyAOk/5RVIRF5zM8g0U9tBvdSXJ0FRQJvAWzSkhePloVeD/ gnPWo4WhXoyg7AJbdUYrNk3JuXj9vC/5zto1WzJNiqrUAQ5t3VuyXUN9DogVbeQq2hZj LsGqMWn3vEEsJzJOJPQimvBk1DtK6bGbXfz7wRMxGCURcjXSF0Uf+0Ux2gaGj86KQw7Q pacQ== X-Gm-Message-State: AOJu0Yyq2LV7AG+dE+Smbp59CBvEvQRoTmUSH9nPgmqhIgDcvq/w+560 YVuwswtKHIXCnHDI8n+lADLk0rfdGNFiLNFbsfhMJFJcvsoBvDGFCc2I21RQU+/i4wEAo61bh64 p X-Google-Smtp-Source: AGHT+IFf8ZGZhDfjYAXFDPsxT7EZZWXpGFpXOeFd4BwtvveykEU8Vst9MseHS8RugHUgHLPbLYodgA== X-Received: by 2002:a17:906:270d:b0:a45:ab75:7628 with SMTP id z13-20020a170906270d00b00a45ab757628mr1214935ejc.52.1709646186033; Tue, 05 Mar 2024 05:43:06 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id lh24-20020a170906f8d800b00a45b1ce5046sm946ejb.155.2024.03.05.05.43.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 06/18] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Date: Tue, 5 Mar 2024 14:42:08 +0100 Message-ID: <20240305134221.30924-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 --- 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 6d4738ca20..c68b17df23 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -221,7 +221,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) +``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''' 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 156737989e..d01b0afbef 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -801,7 +801,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 758d670a36..f77639d94f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -281,9 +281,6 @@ extern const size_t pc_compat_2_3_len; extern GlobalProperty pc_compat_2_2[]; extern const size_t pc_compat_2_2_len; -extern GlobalProperty pc_compat_2_1[]; -extern const size_t pc_compat_2_1_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index bb7ef31af2..d417cf106c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -304,13 +304,6 @@ GlobalProperty pc_compat_2_2[] = { }; const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); -GlobalProperty pc_compat_2_1[] = { - PC_CPU_MODEL_IDS("2.1.0") - { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" }, - { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" }, -}; -const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 594b131625..88457de0f8 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -65,7 +65,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) { @@ -847,22 +840,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, pc_i440fx_2_2_machine_options); -static void pc_i440fx_2_1_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_2_machine_options(m); - m->hw_version = "2.1.0"; - m->default_display = NULL; - compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len); - compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len); - pcmc->smbios_uuid_encoded = false; - pcmc->enforce_aligned_dimm = false; -} - -DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, - pc_i440fx_2_1_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Mar 5 13:42:09 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: 13582459 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 69BEAC54798 for ; Tue, 5 Mar 2024 13:48:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV51-0003EN-KZ; Tue, 05 Mar 2024 08:43:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4l-00039Q-Qh for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:24 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4d-0003zS-8K for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:23 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-513181719easo3867075e87.3 for ; Tue, 05 Mar 2024 05:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646193; x=1710250993; 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=OT8ZTO+xhnK0H2YL2SoKQeqlcBWyfPJJ6GJXZNxMx34=; b=bHPj+mugg4L3i0GiO/vNIiBqQI41PbZnOdRagshb++dvMKvQQeSZQc3hdzHexmRwl3 QaxmPMvDJIO7i+j8VyZch083Sev37eBt1PEhJMJHPH8Se5vYmuIwesgLULjQ4caGL/aK F8DdYk11KIV//YFS7XIG5RCMYEXK5yEFf2Mus/CCC7bRN5DtFw+IUtxpxlUk2eMC5XdO vQNbLRc62SGI0vQ84HEKQmflq9Se+daT/SJpyAh7J99mXmf4+xAF6Bftqcah7p1O67g9 TY3Ybw1opri0UQHSs84nVATjLD5l8SBGtix6fccGkhC8nTjpLbZE3FcxbroRMYPjY+a9 jEuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646193; x=1710250993; 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=OT8ZTO+xhnK0H2YL2SoKQeqlcBWyfPJJ6GJXZNxMx34=; b=m9ThkiyzknDv6s5O1UgCEgMtBhyZjCFsB311KrVhSmpgGwPV1+9YdlkmhbRakKOcca mSYLEQjSDG6N7TX3MpxH1yUg9q1/SkaeAp8ytV1sMdnpC7ymcKg66APJBnwIbhGNjznx /0qbYerVKZAw3Mct1NOtYMhb68oH6m59QgzgUtrwnKM/Yi7hYeg9oOzuVHSXRRAhEOnm LHG9xwNKB9y6YbOho0LdROBtnbdvflCuPrQpp9HGIhpLMezzAbONVgl61gw7Grof7TkG TfRB5DJg6Q+ptOq7N8JfOX6Qn7pbg7xMoyWmdq4PS2/h96LCc4pH7gCiU/ZkQT35+Lne tQRg== X-Gm-Message-State: AOJu0Yzg5fqOfwDUcMG0I7Wk2qA3IDKyWkhEnw6DlRQCKxAJF+AV4zv5 Tj7jPxLsZ1PWuBI703V2dS25TwpvHiL9NIT2k1F3XF6hnQMm6xTuZ5jD5/oWjyWfu0UhwXUccaz Y X-Google-Smtp-Source: AGHT+IHLwmHlfKl35XuwdEpGZVpnOk61AIZfeU4H/uc9w8OSaeyHZp72bMkq1nwPsKgfBewcEeKcwQ== X-Received: by 2002:a05:6512:39cd:b0:513:46cc:8966 with SMTP id k13-20020a05651239cd00b0051346cc8966mr1840957lfu.2.1709646192884; Tue, 05 Mar 2024 05:43:12 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id k13-20020a1709067acd00b00a44f3fb4f07sm3564090ejo.191.2024.03.05.05.43.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 07/18] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Tue, 5 Mar 2024 14:42:09 +0100 Message-ID: <20240305134221.30924-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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 x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Inline it, and remove its declaration. "kvm-cpu.h" is now empty, remove it too. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h deleted file mode 100644 index e858ca21e5..0000000000 --- a/target/i386/kvm/kvm-cpu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * i386 KVM CPU type and functions - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* - * Change the value of a KVM-specific default - * - * If value is NULL, no default will be set and the original - * value from the CPU model table will be kept. - * - * It is valid to call this function only for properties that - * are already present in the kvm_default_props table. - */ -void x86_cpu_change_kvm_default(const char *prop, const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default(a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */ diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c791b7b05..cb8c73d20c 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -144,7 +143,7 @@ static PropValue kvm_default_props[] = { /* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default(const char *prop, const char *value) +static void x86_cpu_change_kvm_default(const char *prop, const char *value) { PropValue *pv; for (pv = kvm_default_props; pv->prop; pv++) { From patchwork Tue Mar 5 13:42:10 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: 13582448 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 B14CBC54798 for ; Tue, 5 Mar 2024 13:46:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV56-0003Lu-2l; Tue, 05 Mar 2024 08:43:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4l-00039P-PG for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:24 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4j-0003zk-Nk for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:23 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-563c595f968so8432132a12.0 for ; Tue, 05 Mar 2024 05:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646199; x=1710250999; 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=/uaVgcIj5CZp4PgaMSlBhVfscYd2B9Mi4dr8ANISE2s=; b=NnFvYTlkZ8URXbMCv+NnVDrhJuWL7bvWlgRYgTxdGbRyGtpCPUehurSZ6vBfIRZxTy ZpT1+a+NyxlSn70Hp7vLhb8oAHJ8hI5Pgzg6d4ByTgZxY4yywpjgeNvkWFyXrUFNBSk/ mRqgU2QdDa4Ert1x/1I6lwnHHoHb4IGE004KarU9SbKXDqJyNiKjKPy9QN+7PuWYIAcX xKABQ13o5x0EfOUBSM8VVVczOFkYaML85sxm37iYL05tbT+tb8K1Fl637GKpH+CbQoSb 3etFwzMKYmchho6BLM3xNQv0qnnEm5VOHjiraIqtSWhS0KF2brnNshwcHcAw9CJgdpuE ZRaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646199; x=1710250999; 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=/uaVgcIj5CZp4PgaMSlBhVfscYd2B9Mi4dr8ANISE2s=; b=STtLsAF3zmS3rnj1vSv74xktuh5COuB29IzHkNYZBRxrGNqYjjXloE42WAohvco+Jk bnvlhRDjcbzbijBrs0QAhupy0yUV8Q1kNfwNAShfxLMSLyZz8S6FyAvgmHEm2sg4HTMn ixCJUrFCQnvrGQt0MQC9TAmsyhh8LOKWuGAfs335p1lfu0sk9inbvIlR5vlUL4KUVObK l46p5arLNb7hw0mAgBTivB3l8i+OWwyoHFbK4E4FwfVXu+ZYNnYvW2FIaYVbMJZi/w/k OzQZ8LiTm8EzVzw+zKA5+Cd1KEK9LJHVtVv3UHqn7LuFCbTcmtWAfoasZ+ekdMRndWAX xCxw== X-Gm-Message-State: AOJu0Yw+eaI+3eZbix2+wZ8kDOo/jqFIdgUTAYkbG05V2iGWzRlrBAKU fORY5kJyr5l37T1sptNdCR+bUXLMxoLvrRBDB5tBTNHu+8eMhWjsJxe9vieKN/VlN76V4AG/REx z X-Google-Smtp-Source: AGHT+IFX0UlicD2nXIVlAQ+n7nrYayFTU70QHqN/oYZVIOnExi3rdtn3EIahhoj5s7wQRhibaK+BUw== X-Received: by 2002:a17:906:f2d1:b0:a45:7d04:c1fa with SMTP id gz17-20020a170906f2d100b00a457d04c1famr2588070ejb.67.1709646199488; Tue, 05 Mar 2024 05:43:19 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id q7-20020a170906540700b00a45aeaf9969sm238731ejo.5.2024.03.05.05.43.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 08/18] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Tue, 5 Mar 2024 14:42:10 +0100 Message-ID: <20240305134221.30924-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 2 +- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index f77639d94f..f051ddafca 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 98a478c276..176c086673 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, - pcmc->smbios_legacy_mode, pcmc->smbios_uuid_encoded, + pcmc->smbios_legacy_mode, true, pcms->smbios_entry_point_type); } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d417cf106c..409114bba5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1791,7 +1791,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true; From patchwork Tue Mar 5 13:42:11 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: 13582457 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 3975BC54E41 for ; Tue, 5 Mar 2024 13:48:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV5N-0003mb-LS; Tue, 05 Mar 2024 08:44:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV4u-0003EI-FB for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:36 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV4s-00041u-QQ for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:32 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a3566c0309fso84585866b.1 for ; Tue, 05 Mar 2024 05:43:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646208; x=1710251008; 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=0hhJFtIMtwQt2Q60UHnY//zCzzc81rKvwExxrpPdrH8=; b=nTg20HkEdgEnoO5MKX9hSxi2m8Tk4JLhSlJdPVU0Kgdm80bK/arkGlcY2m7W7UQI07 h9ysVqKrXrOt/a+ZyRcZ/yK6fpI02w37iWO1NBtFUziElrB/v8p2w2mZjYb02EkWrKzV Vp7X4zvyM5Kj1MLtLahwu8oj3uAJEgjeQGf8dtYXe6dGjcGFfSPa7Rvi79iN7/G9jMJ4 mjBTI277xSQllLD2U2XKfyDn4wONQZ5Q8MWSlkKnhVoQYqJ0/CXemvzHbj4De/tW9BqO YqjZCW7PtiBM4XiixDURhmlh3yThs6zxfUgWeWXzLs0feyBQZ4/fWq+BxlWgYsadB7BQ 1Xrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646208; x=1710251008; 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=0hhJFtIMtwQt2Q60UHnY//zCzzc81rKvwExxrpPdrH8=; b=uG5gnxNp6TbXYwKSu3+wq5vwdlSZId+7Ex0Thv3uePTu81pDyrB5QeOcTeByLeu8to Au9RYofBrqXtkFLCWHDXAYCzKzPa/ipC5eQsNYL6C95otU24rTfEcuNje5sBqFSJkw2s 35CDLqkkc4ZLx3eNEG/VFLMZDPYgtiS+XNIiqkkbPSR6RTTt7NStsYQWhHhUn/7B/l+5 PvgbUcqagSX/QHBL1TzKXGWwBRaBeCoP82QuUZsTMAHeZFkaOZUSTD34HSot+OQEP1qU xSvA+5e0/xP9VKNHwQTvfC/oT5vfzALPITz0PHUdCknSPU2y4c27Rk5rhGgu2NmMc+km PzJg== X-Gm-Message-State: AOJu0YwQfelrrKmg6F9bQ1dmSp35uzCdKzReRbmvoTG1TQ4Mi1vnUHHA 8vAYCXvqqkn8XKBkoYIBhfuxTq02SvnfOZUcPLI3neWOUXgEqUp7GaCFPmacOXfR0g1i3rWeOnQ b X-Google-Smtp-Source: AGHT+IFem75Y0FPHygJH4hylsAO/6REF+jZArZQNrRqkWJpWcKTi1COMM9pGe9G4ODDoaNilTiITnQ== X-Received: by 2002:a17:906:1c8d:b0:a44:415d:fa39 with SMTP id g13-20020a1709061c8d00b00a44415dfa39mr6365674ejh.37.1709646208209; Tue, 05 Mar 2024 05:43:28 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id f18-20020a170906049200b00a44ebb34851sm3773626eja.10.2024.03.05.05.43.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 09/18] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Tue, 5 Mar 2024 14:42:11 +0100 Message-ID: <20240305134221.30924-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index f051ddafca..bf1d6e99b4 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,8 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @enforce_aligned_dimm: check that DIMM's address/size is aligned by - * backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures. @@ -114,7 +112,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool enforce_aligned_dimm; bool broken_reserved_end; bool enforce_amd_1tb_hole; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 409114bba5..0950abcc2a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -734,7 +734,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; @@ -742,10 +741,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; @@ -1301,12 +1298,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; /* @@ -1331,8 +1325,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, @@ -1793,7 +1786,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported * to be used at the moment, 32K should be enough for a while. */ From patchwork Tue Mar 5 13:42:12 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: 13582447 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 CAC8BC54E41 for ; Tue, 5 Mar 2024 13:46:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV6S-00055L-PS; Tue, 05 Mar 2024 08:45:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV54-0003PM-9k for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:44 -0500 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV50-00042O-30 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:40 -0500 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2d33986dbc0so9266371fa.2 for ; Tue, 05 Mar 2024 05:43:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646216; x=1710251016; 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=8+MCTA1UltNqL+EA8gVKWQmk1jjDdIIyMkrSTBOV/KA=; b=H2e2t35iS2U0o52j3CarRN7e+pXelRwYzjuESiNvoR32fgvhv0EcMWgJodtDHBGFV2 fLRpJvU1XPv8QIeObmmUHTGab2WxyF3LRCjmePWIblxEfuJM1Tq+OZiEBJDHgZLTIvvI NrxnbGADNCfOUFK0XHr+MqLF1oH09ZHtpYnfzjVigm14czd8nk/nl0j4gWdTm+H9Esli Aq45gz2KZakhVmwfOJl7TM7iFUM05RWWwIuzv+dT+weY91HqoZVRoqryQbnqfTLX4Xkw 9oPPZmmH+AOqLTtwvlrMRvUkveWZQaWYVNrziVibHnN6jbnMUwuicy2lptrcG++qtxDx TNPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646216; x=1710251016; 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=8+MCTA1UltNqL+EA8gVKWQmk1jjDdIIyMkrSTBOV/KA=; b=ehxiQ5SswKD6Poo0EdkdNW5We9RsG39Vl18RSj5Ge4pv/9Mj+MgU7EZJhJUPNmBFZo CC4SfxlcV8IkFejK9em9n4XPX4kFFRKNlcaKe/Tf9LHQgkmoBNfwsfgsUeZuhSCDFvOs oidzhyq/Smklv3XhYfLlfEoB++SOLukYXlWPrYfvMyDSr/bndxIiOHrdWYg2L5hgQk55 WiMVK78BXSznKw4NyG3eWPeidVCX0US8FZSRokFsxJecoz8jeWwGKl4zq1hxrmHqz9Lm 4YQNEggmCajz12YkHzk6BHlQDdDexkN9EPDfMOcXalnGhpocDdV41iD5tad0yolQA4Si LwiQ== X-Gm-Message-State: AOJu0YzMv5Jde7IR7xUljGyZizzCyD/RrywXo+BMcSB/fypJXImAzTee LXb74SXRvuyImSP4HaLllFPR4AW0F3QRo+a8nvuxOezvmm2jmUzv5snwesPbzLUcC8dsbrmYB1p s X-Google-Smtp-Source: AGHT+IHpNwIWn9dU253fZ8k5m2DWd3SEtuggzOllzPMD9VtxMkKcCh3wswwtA70e6fwn1H/OqFetiA== X-Received: by 2002:a05:6512:2028:b0:513:177e:4254 with SMTP id s8-20020a056512202800b00513177e4254mr1162168lfs.14.1709646216124; Tue, 05 Mar 2024 05:43:36 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id qw28-20020a1709066a1c00b00a381ca0e589sm6032584ejc.22.2024.03.05.05.43.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:35 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Eduardo Habkost , Song Gao , Xiao Guangrong , Nicholas Piggin , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , David Gibson , Harsh Prateek Bora , qemu-arm@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH-for-9.1 10/18] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Tue, 5 Mar 2024 14:42:12 +0100 Message-ID: <20240305134221.30924-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+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 --- 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 0af1943697..9a6df69642 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2720,7 +2720,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 0950abcc2a..b4736822e4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1325,7 +1325,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 1e98d8bda5..2e8234affd 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1024,7 +1024,7 @@ static bool memhp_type_supported(DeviceState *dev) static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_machine_device_pre_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 37f1f4ccfd..836384a90f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) return host_memory_backend_get_memory(dimm->hostmem); } -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp) +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { Error *local_err = NULL; int slot; @@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 55263f0815..32fdca2bd4 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3639,7 +3639,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp); } struct SpaprDimmState { From patchwork Tue Mar 5 13:42:13 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: 13582455 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 8E315C54E41 for ; Tue, 5 Mar 2024 13:47:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV5X-0003rf-GC; Tue, 05 Mar 2024 08:44:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5A-0003V7-67 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:48 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV58-00044z-B0 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:47 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a4467d570cdso581460166b.3 for ; Tue, 05 Mar 2024 05:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646223; x=1710251023; 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=x8AzlbW71FoZEbM9SW64EPE4l+5scV2AZFmKYcyJfIM=; b=wHxqtGdcezR18g7FNz8JygeMHBklQ8jR+dtu1BZwM8jpRS4u62gATBbXQstEMIckWm L2H8z8jsIopzK9b9iQ8a4oU9fvvLPbMZ4JSckdGBARGM4E4OJ7N3MI3ibxeLhe3/bTa5 nvGixWdIsbWPM/edb7WItc1/gD4rKnZJAx/QgM49ec23DbOH0CJuBmdbYiuWpVvRqP1E Oz0ZbxlHvDmqlN9iFtRbkfbs6mH1+inqzOtOZamT2QUILHITCea8dPFYZ2PdvVHIKn9b 6PhVpjrpoCu9ObFQkFo3+K+QzpPL7RRzWfBmJfTfoAYHIXoaSIDKxfkTRdOSNAp+RNgO v4cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646223; x=1710251023; 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=x8AzlbW71FoZEbM9SW64EPE4l+5scV2AZFmKYcyJfIM=; b=Xf7CdHkhlA8Smd53jQVPeTpDEDYvCFPPlc4YNvspCkxWHMlnZ8v+/gn7ea414RVAJ9 Tl1i0487WB/UnH8yxEmsrpgBuEiGFT7aQffrsceSCR5yiVqzgdq1IkNuTgt+hOmnWp3K kEFpX0iC3aCzTcqIRdfHKQhvtexMxy4mgjNgUPRyzGt0KrcRG2JFv+Th6oZQDw9VfgI8 vzPTvd4e/K8DPGIyXM18/iiiIoKRrdqRVefq7knsjfRJzTfyglFiQ8UdZUx07Y5XB70O 7wMO/iXleqavcc2S8mP10B5mAg0s3y4yOtkSbM4/m1tq9fN7M1KdZN30AqoU7FmIvREP o/kw== X-Gm-Message-State: AOJu0Yzc1sHOl/pSKyzndRtfD6Btc39/ZPSOkPDTenzZiBqA4dGuT3Ns wqe6sOHIsZIijF0fvbv7VQG1rf1o5QaA9DRb/e1whLjiZXDKvAQpa6i9p8vrmmBwdOzm1suQmE9 4 X-Google-Smtp-Source: AGHT+IF/fc6fgxSnTTF8ZveiPTSNL1c4g7TqI8j5ZSILt7XGF8o4gWsr5K5gYzg0J7LmS56WjirHBg== X-Received: by 2002:a17:906:4712:b0:a45:84e7:b265 with SMTP id y18-20020a170906471200b00a4584e7b265mr2910138ejq.7.1709646223113; Tue, 05 Mar 2024 05:43:43 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id f27-20020a170906085b00b00a44ef54b6b6sm3649227ejd.58.2024.03.05.05.43.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Xiao Guangrong Subject: [PATCH-for-9.1 11/18] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Tue, 5 Mar 2024 14:42:13 +0100 Message-ID: <20240305134221.30924-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- 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 b4736822e4..ea7b05797b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1393,8 +1393,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, { /* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert(!dev->hotplugged); - memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e098585cda..a5f279adcc 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) } void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp) + Error **errp) { const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md); Error *local_err = NULL; @@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, return; } - if (legacy_align) { - align = *legacy_align; - } else { - if (mdc->get_min_alignment) { - align = mdc->get_min_alignment(md); - } - align = MAX(align, memory_region_get_alignment(mr)); + if (mdc->get_min_alignment) { + align = mdc->get_min_alignment(md); } + align = MAX(align, memory_region_get_alignment(mr)); addr = mdc->get_addr(md); addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align, memory_region_size(mr), &local_err); diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 836384a90f..27919ca45d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c index 62bfb7920b..9ec5067662 100644 --- a/hw/virtio/virtio-md-pci.c +++ b/hw/virtio/virtio-md-pci.c @@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp) * First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ - memory_device_pre_plug(md, ms, NULL, &local_err); + memory_device_pre_plug(md, ms, &local_err); if (!local_err && bus_handler) { hotplug_handler_pre_plug(bus_handler, dev, &local_err); } From patchwork Tue Mar 5 13:42:14 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: 13582445 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 9ECCBC54798 for ; Tue, 5 Mar 2024 13:44:41 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV5d-0003vw-L2; Tue, 05 Mar 2024 08:44:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5G-0003fE-HN for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:55 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV5E-00049Z-6X for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:43:54 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d3f962a9dfso2855181fa.1 for ; Tue, 05 Mar 2024 05:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646230; x=1710251030; 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=crLnBPuyRmvWsoYI1VEnIHyayJ9tujHUtxXmAXPz7S0=; b=dVA8r0/TOOhJELImYaE9yCssjFlY9exhc7uUhaN3X2j3C/CpuhikXvpWXWBSX8isCW oqYB6nYCyvQ4HdYHBKW41N/WN7uGaHx4G/xtyLCoVYl6JKMrr1VkjQ5fl3rc9+MGQRH8 Ue1MvdZtYWa4RyjaHOuUgbv4LUQnhe9m6901FARptMdqi8FNW8wtpXLOiHqJ082AweZI qT0PemFB4Vyx+wI05y2Ote4n2WGzBSJtORDRhN+Ez6FyzJiZmJrzXlFmU5+RRixkrAcw sfUcYaa8ERNJsa81OxHtpTdcCVo2QlvjHdCyXJ1a3+IJ6s1j4xgQoHFgl/NA7S3TXB/Y l6jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646230; x=1710251030; 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=crLnBPuyRmvWsoYI1VEnIHyayJ9tujHUtxXmAXPz7S0=; b=aKD15vqBY7KF7Zqjbfw3n/eSzMOV538PScaRtyK4xYxWlLmjNfiTRfLKWWIcH5/nje Q4tNxn9ruTv4LW96Fy86/jLQrAAo0T3KK4bagbcH2cYMEvsIUvfUwp3ErBZgXXLJvjNB Y545hwnz9M5mLELaG/uzs+Tz0ilzDQ+phzk+UwMBVGH0Tww/NhCe4P05UtzYHDQpsbMT K3gNVqVu5t5Z9Kd19JMFfYHU94yG6Xx2EZJRQFg85RRWDHPOy5Q/Q+qQVhJix8IJGVrD wBIRoezWN8O2Ioy7imeHcAnGNi1w7rCu9tSBlNQkhVeZZeKUg8TYMtZNAqpzXsz+LWrU hvOA== X-Gm-Message-State: AOJu0YwOBZxLY2/GJnhrWqNyGfZ5cyOsOiuU+rvPyZQmKyf1890BTztv V856YC0aciUxYmpto1AXGwF7rAGqqCyzmzqFDPKnMIhF2z/jBi/BB37scr7ose7pij3Wt319zFZ X X-Google-Smtp-Source: AGHT+IGFXNMkQQ5YVY8UgcokF2PhotSsOKNiPHMYVo14782EEjGRnY/YAP3IVXaa0oSUfvc5RQL3mg== X-Received: by 2002:a2e:b0e5:0:b0:2d3:ba52:f878 with SMTP id h5-20020a2eb0e5000000b002d3ba52f878mr1364796ljl.0.1709646229749; Tue, 05 Mar 2024 05:43:49 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id k40-20020a05600c1ca800b00412b643b5a3sm17863110wms.11.2024.03.05.05.43.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 12/18] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Date: Tue, 5 Mar 2024 14:42:14 +0100 Message-ID: <20240305134221.30924-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.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 --- docs/about/deprecated.rst | 6 +++--- 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, 4 insertions(+), 51 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index c68b17df23..84c82d85e1 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -221,10 +221,10 @@ 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) -''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.3`` (since 8.2) +''''''''''''''''''''''''''''' -These old machine types are quite neglected nowadays and thus might have +This old machine type is quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type instead. diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index d01b0afbef..c2ec08f56c 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -801,7 +801,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 bf1d6e99b4..f7a5f4f283 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -274,9 +274,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 ea7b05797b..a762df7686 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -281,29 +281,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 88457de0f8..e5a2182211 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) { @@ -824,22 +819,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 Tue Mar 5 13:42:15 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: 13582452 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 550B4C54E41 for ; Tue, 5 Mar 2024 13:46:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV7H-0005NS-4X; Tue, 05 Mar 2024 08:45:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5M-0003q8-TL for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:01 -0500 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 1rhV5K-0004CJ-RL for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:00 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-412e993a82eso5910655e9.0 for ; Tue, 05 Mar 2024 05:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646237; x=1710251037; 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=5TGU952DKVM2tYEewPZVbKhW/aUuUpfwS5FrOa58Xf0=; b=vtF1tvFDKeRE41WleMynsESZi1ZcL4GnrdkVf+bYgwd76jM4a7vI8mLBQZu88GxV7B mdIMqprGLnzEiWUM5TuGw6FPK7fV0WWkhNXmvwyFrAAgplP0SPh7l++nRNF+6UEBkLnW AvqI82k8KXrbqlU8241J+Q3iaCLEPl7hzyajOeTOBA/PLlxT4R3xLW4N4k8/RiA9BlP4 qM042zqAry6doADPolty/CtBElhNqHR3K7o6LP3IRl3RtOaqM7pFF8QS1yJyUZS7AyjA f0/nCEvYsr4xAKEE4McVJkh1GBkHcSPV3pB+d9Ngq/bRXZW33jBuIy4B7uOtKcgWPYUM ZqEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646237; x=1710251037; 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=5TGU952DKVM2tYEewPZVbKhW/aUuUpfwS5FrOa58Xf0=; b=EkbH/23sFKt4dAsIrd47xrFRknP1F0c9/rz3N8QJdDuQtLUV70KnF6skRUkcXF4VDB 2Fcrkom3DBt1a63A3xnwax3/wPF328jUkLY+g17M1q+K0P0Bf8UFS3e/H7oGQTy7NCZv PtNkbGSWky4iSX88eXM3m7jrxmdZhGz7YIEj7GVTVzKVZZjXF2N/KieRzP/P9vpET+QK eNCOXOzIMYlVEtUg93DxC18S+hOhF5wEhbGxPlLMX/WZXEmIUNjk5EMqL68gHE4ENBVv 5jk0sGrgh4+jb5x6TxOKKjqKZOpf9RSmzQ5+H87PzPl8/zdm0OycpPEeZKg0Ky2B8FWH Z9Dw== X-Gm-Message-State: AOJu0YxL0qKPWhsfGL9t38gD5noLtx4mGSq7T6bqV5Pwh1zs59UF0pVj Mwh3Vgv7iRRnt2+em/Cgv/Tn3jjCbaR8LbsclkAahx1tcGSuEdUcTCWBJxTco2C1YSx6k9g2+7/ 7 X-Google-Smtp-Source: AGHT+IGC2D2rmKYCMfxA0oHHpGajfv51gJDo/dA1KdNcDkrWRiY8zzCZcuiUCdaP0oLhW6EOx+KtAg== X-Received: by 2002:a05:600c:1d17:b0:412:e993:d5da with SMTP id l23-20020a05600c1d1700b00412e993d5damr2100311wms.32.1709646236748; Tue, 05 Mar 2024 05:43:56 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id o17-20020a05600c4fd100b00412d68dbf75sm10917201wmq.35.2024.03.05.05.43.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:43:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 13/18] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Tue, 5 Mar 2024 14:42:15 +0100 Message-ID: <20240305134221.30924-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-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 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é --- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 9 --------- hw/i386/pc.c | 1 - 3 files changed, 13 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index f7a5f4f283..be3a58c972 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -124,9 +124,6 @@ struct PCMachineClass { /* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; - /* resizable acpi blob compat */ - bool resizable_acpi_blob; - /* * whether the machine type implements broken 32-bit address space bound * check for memory. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8c7fad92e9..a56ac8dc90 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2688,15 +2688,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. */ /* 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 a762df7686..8139cd4a7d 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 Tue Mar 5 13:42:16 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: 13582458 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 B94C2C54E49 for ; Tue, 5 Mar 2024 13:48:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV7M-0005xU-S4; Tue, 05 Mar 2024 08:46:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5U-00042C-9C for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:15 -0500 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 1rhV5S-0004DT-2W for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:07 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33e383546c1so1120806f8f.2 for ; Tue, 05 Mar 2024 05:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646243; x=1710251043; 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=FzQHy7YOOPXp7F0gjrTW5/+w7YXN5elr0MFrrc4cC28=; b=czTuksCWPuPMJbLBSlnWvjaiX4isNQhxrdXa2RXMGy+AFLrXUVNex8VAKNV3/tq00P htXUsw/hT8t+t/K0TX/h6GN5VTzcBBKyFPGwmRwe+qhLZJlyp3zNIuIhLtoNYv/CHJep 3ZBkpmVoXMBNvBKEUMUAd2CmMIa+TyGVfhKHOEhaJyn/XY+7sTvhIE6+M6y7k/nNPxuF JMVBehLIS2shEwRX49KjgEQM/5OiVEVwqmdAZqj4RHNv/l/kjhBGTptTCGw8I7t7Vmpy rzYs8rSNKvfROnMFEPGpsQCEKYwvLAv7dz4yZcOyqUBdndfTPK44awCVEi/bLEuMjfa0 hjiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646243; x=1710251043; 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=FzQHy7YOOPXp7F0gjrTW5/+w7YXN5elr0MFrrc4cC28=; b=ZSuPeqkF0Byu9+6eVSWPStS0w9jtGCTZcx1+I01bFSePwBwt8sKsVJMKVUWhT9BBgo oPt4xRZdTf2QGxCnlE3gRAGF5iokrcC0tSKHn4ouC+6f03dqNbFJZBN1DQpkdlZRCisK fhDarn/8i9w2/CmW4BwW9dUF5sawbmrAxorzUbZbsatTcYlqX8/gtK5tyjFCIw+dH6tE tXhYh4kdlCf6bLmJPxvjoMu7fM4QbghKSyKELpAUxfYp+b15mYbcIBqKMUyN0KAC93Rm z3IwfL8uAwamidv4bPfJu0e2/kdotGvhqw4TeTbMnxrBDsDuMTTtgflqhLEs3Ck6Tpu7 yldA== X-Gm-Message-State: AOJu0YxSPrzdll3riyqRiFAK9RMvMoctpoU26Mk/SVKfx0zmzDiF//wf gnVL9lTZ2i5LSEtu1ATxoen1SYbPPXkCuR5mEE34FxO6pdtbBLrzF8+v2Lguft8ZbbrLonsBBiI j X-Google-Smtp-Source: AGHT+IEjpwA0g43mBREYBeuT5/kLCNlui8vuGjhft3ga4tNUhSEjB3x6+ULiPdcLMxtnN6fCCD8dmQ== X-Received: by 2002:a5d:6e48:0:b0:33d:6c9f:39d6 with SMTP id j8-20020a5d6e48000000b0033d6c9f39d6mr8913204wrz.40.1709646243280; Tue, 05 Mar 2024 05:44:03 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id f6-20020a5d6646000000b0033e34982311sm6992738wrw.81.2024.03.05.05.44.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 14/18] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Tue, 5 Mar 2024 14:42:16 +0100 Message-ID: <20240305134221.30924-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-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, 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 --- 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 be3a58c972..b4a9ea46a3 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 a56ac8dc90..12bc2b7d54 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2492,7 +2492,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; @@ -2664,16 +2663,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 8139cd4a7d..7f41895d97 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1758,7 +1758,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; From patchwork Tue Mar 5 13:42: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: 13582454 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 4A0B6C54798 for ; Tue, 5 Mar 2024 13:47:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV7w-0007VJ-5w; Tue, 05 Mar 2024 08:46:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5a-00044f-5w for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:19 -0500 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 1rhV5Y-0004FG-8D for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:13 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-412e2dfa502so5771845e9.2 for ; Tue, 05 Mar 2024 05:44:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646250; x=1710251050; 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=CWBRqdFoui2ZIQdsVAc4WwMyQH/pl83wSwYQ0f8fh5s=; b=tpktzmtWv8GYaEoDhnCIF0JfbLDkhqYp9+JHByZk56/avxWmBE57Ypx8SqPsx6X67s /oHctsCqUSH0SwKPasDb5DRnlsZYYEE2mX/XJDLSnY0MSgjIoL5oMgtfykHdfhXhlI2w 1WN9JbiQ2SIb3PjpbWf8XFG3SHIXwZfcbJh1+uk8bGvtc/BAtCXSfgxBcNMWPxOtZcYP QBSU8t40lWkLJTtn3CyP+i/TIzHdfMt+QBT9tp7IdiRR2tMqfHthwaN3LSEHqJ/E/17C Zd9hHfhQqHJh/M9kWtTkxrUaqpDX8qY+U5bFLnq5RFuPeqC945ToNtq9MOjzukMdDnyW tDVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646250; x=1710251050; 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=CWBRqdFoui2ZIQdsVAc4WwMyQH/pl83wSwYQ0f8fh5s=; b=tjNFz2iID2qir/kW6BJ7spaob50J/M8oWnI8Lm7tFebI4Z3UChz8FHFVpotB+iO5qj s+gr4KjtyDJYvTlVB+nDAiDbTJcKWurRp+70dnvgsU2Yc7yI7o5yiOUKLq7SoKSuh+AF Nk02feTqPjsULTLRg3Kba+BEnSJqtEg6tD3eOhqc0wqixzowMURxMtjyyG66SAgiyiv+ zdiHpTu3KmrWl/0oKzLX1k/Vuz1I2/HPzQfta1aN+PZGL3s5zji3+DlK7PqEQan27yN8 Bfemi9xuW9iV/H7dgDR5N9gdl3An2+kfDogRbO52gs656NGwPAHcfGfYXjwgum/Ku1Jv CUIA== X-Gm-Message-State: AOJu0Yw6yeY2d6myyUI829FOEQ9TRJp7S8AYZFUdCw1uLPW+KerubIaI Dzpnj1J9eBjZqmVzak6IM6+D9SFYD3ayHkAYmTkSwGR1xcGNDTPe7laQncuOmRk2UnI4ojpATz7 j X-Google-Smtp-Source: AGHT+IGQTuvSA25MYt3l0zdavkjoVT1Rvq7X1tInRhssFdU2bEWiaupK/vlzesgSWvabYqXcp2J6Qw== X-Received: by 2002:a05:600c:3d0f:b0:412:f0fa:5c81 with SMTP id bh15-20020a05600c3d0f00b00412f0fa5c81mr14729wmb.12.1709646249934; Tue, 05 Mar 2024 05:44:09 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id bd23-20020a05600c1f1700b00412ef097c27sm1260661wmb.16.2024.03.05.05.44.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 15/18] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Tue, 5 Mar 2024 14:42:17 +0100 Message-ID: <20240305134221.30924-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-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 AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- 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 12bc2b7d54..bf727eb148 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2456,7 +2456,6 @@ struct AcpiBuildState { MemoryRegion *table_mr; /* Is table patched? */ uint8_t patched; - void *rsdp; MemoryRegion *rsdp_mr; MemoryRegion *linker_mr; } AcpiBuildState; @@ -2715,11 +2714,7 @@ static void acpi_build_update(void *build_opaque) acpi_ram_update(build_state->table_mr, tables.table_data); - if (build_state->rsdp) { - memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp)); - } else { - acpi_ram_update(build_state->rsdp_mr, tables.rsdp); - } + acpi_ram_update(build_state->rsdp_mr, tables.rsdp); acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob); acpi_build_tables_cleanup(&tables, true); @@ -2805,7 +2800,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp = NULL; build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, build_state, tables.rsdp, ACPI_BUILD_RSDP_FILE); From patchwork Tue Mar 5 13:42: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: 13582456 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 AE83CC54E49 for ; Tue, 5 Mar 2024 13:47:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV7j-0006S1-UG; Tue, 05 Mar 2024 08:46:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5j-00049P-1v for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:26 -0500 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 1rhV5h-0004Gp-AE for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:22 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33e2774bdc7so3437238f8f.0 for ; Tue, 05 Mar 2024 05:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646258; x=1710251058; 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=0ijGEHV3qc1F3JPlNft0UaVVASq790sFq2U8890KClw=; b=xcT4tHrBwMLXNyB2wgt3rNTPoRrgWV0LuP8iDZLhiALSxoly483s/gSY7sdK4/diZq B0ej2tW5ArL+ZlZLJT8J5hjt7mYSvZsfqW8bcu9iqjQSZgVeCUOQChHku7BrqDKRft3P zVkcW1BPvDdYmWOYbkMQfxCwAVxxlDgX5hvi0zj/TUTnlYMTUqXojGjMaVO3D8PVr7sg FLBRoH1Ve83QyqLP5L/xR24G6R+kpkfKWO4IqXwqKIbG9ZPWdBv5utCwqLKMVkk4xCsN 84NgenrvqO4FUpQBjejLWsyZxJeuSQMqi8r8teXyOtE8iyO7rHGiFwJUqxF/i1zroKaO 6zGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646258; x=1710251058; 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=0ijGEHV3qc1F3JPlNft0UaVVASq790sFq2U8890KClw=; b=GaYAIq7FasfRD5e6z4LuoFR+RwaoPqHMTaEGnUBUYx+t0cE1iCldvo96/tSAi11pSU /LTsruw0hJSOfbu2rjgajx0eN0YNfR55kkceIH/drZd4yX0ipRrtR3fXMYGxHuhtJNsh DO/vSyfTV3NWX/umRtJRj7zChSjctDsxzUvnuXzhmYDKacmjE2RaZF1pK0MMRKsOaRwR W1Cfws1/qAfFJAcxZTfbHx0u+5utQoq0xKn4r8YSz/+3ko1mGnUF7+VmKsCgDQ8wcqud kN2SxPwdu3fwPcExfvv3Eru4eG5iJdpGyY2yzXCHCn8dg/Q/5hA6bdL+z2XXyKeKOlZZ rAYQ== X-Gm-Message-State: AOJu0Yx4cvSMTFuA/ZY9gMX9HkXU3Efnbwq+7loPDGwM2Lx6xbwi1tZn cYoAqrdtcZ+pddHe/6vnv+NpmoOKb802D+ZKfE3+OgkwlsK7OMywCXHTek9BD9JwVU3Y/u0Ysif c X-Google-Smtp-Source: AGHT+IHZi/JMf/B738CVhWG7eDChuF+p775TwNNz0xLGRtYqph+j97xXKvLHDPTy5WjIdMBezCAIAw== X-Received: by 2002:adf:f103:0:b0:33e:1c83:6a97 with SMTP id r3-20020adff103000000b0033e1c836a97mr8891742wro.13.1709646258044; Tue, 05 Mar 2024 05:44:18 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c468f00b00412b0e51ef9sm18116631wmo.31.2024.03.05.05.44.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 16/18] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Date: Tue, 5 Mar 2024 14:42:18 +0100 Message-ID: <20240305134221.30924-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-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 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é --- docs/about/deprecated.rst | 7 ------- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 20 -------------------- 4 files changed, 1 insertion(+), 53 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 84c82d85e1..78be35e42a 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -221,13 +221,6 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''' - -This old machine type is quite neglected nowadays and thus might have -various pitfalls with regards to live migration. Use a newer machine type -instead. - Nios II ``10m50-ghrd`` and ``nios2-generic-nommu`` machines (since 8.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index c2ec08f56c..533d4669d2 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -801,7 +801,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 7f41895d97..4b9f4c5c2c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,31 +256,6 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - { TYPE_X86_CPU, "arat", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" }, - { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" }, - { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" }, - { "n270" "-" TYPE_X86_CPU, "min-level", "5" }, - { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" }, - { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, -}; -const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e5a2182211..2e056036de 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) { @@ -807,18 +799,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"; - 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); -} - -DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Mar 5 13:42: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: 13582449 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 B6C5DC54E49 for ; Tue, 5 Mar 2024 13:46:38 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV6W-00055g-Iq; Tue, 05 Mar 2024 08:45:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5n-0004F5-Rp for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:29 -0500 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 1rhV5m-0004IW-1V for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:27 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33d6f26ff33so3678951f8f.0 for ; Tue, 05 Mar 2024 05:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646264; x=1710251064; 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=gi5x0OedtFiXYvl8cpQZIwBhtQ9Cn2QNkroxyToz+PA=; b=ovOXZhSojUVL7f/nmL4H7vG7WdNZKQUGL3G08M922lVyQzRB8lo41ss1vr5bxXdWh6 O33Q6epATFlWD/BUuY1PpGF/Sdj0WEAQBjUm9Ga/yJ+qQkrEG6qvBnHtd5LdtRI0/erR 2njraWTmFey4oS6fyR1IY1KbTg7WKwwzBduK3wowe0S5YR/7kndZpicdMV1M6ByZjJWb vap9pWW6NkghkY3hIeyD1F2DGw3BtbfNhGyOL6LPyX+0pnFeIAX5WYZSwM8g36eh8riR ZVId/BYqPsxFkandzamfqEolf9hv9juZ0gNwJQgm5jGIa+HLwNyH3WajRdT3ZyqBXqk5 eD5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646264; x=1710251064; 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=gi5x0OedtFiXYvl8cpQZIwBhtQ9Cn2QNkroxyToz+PA=; b=huGZdffapXLtnumLy6NVNUKD4p6qf96PkhybHlOvlM3PA6Un7lRhkIh8eiGBi0GOiN K2Qs+aBWxmPwjN9uoH32cgn9Z8He8F75vPu6JaKO9cKp4sRh+Z/XLLGWu7NHBK5NpCGB 45WWyHmHOSTQ9NhgC+z3AICkaKT7hV3Rp6QAe0TNuvt3Uuq7te0l9jFmquG9eFEnuPlg 6GfIPKvCfyXhg0xnJSthNIEvyjHtf1/qoW6P4YhUyXxz/PNNckvjOj+mbWxUwplNXnBV A4RbK+128duU6QwHkqBi8gjK4xHd4leeWM/wpDX4V1i7QIMOTp0yamrqS1vFyHnaLdcA Uq/g== X-Gm-Message-State: AOJu0YzMZ4uOuFQOHNdxhOflaXqS0zcipx5paXyk1gfEJvKZyVqumaso WvauFSvtfpXh2IbwjiSaFBZsP+KVyKyjz1w9cRGfV2HLGFTkA3Q5LYUa0lmke2koc9Mcrn8Rl9/ Q X-Google-Smtp-Source: AGHT+IHolUnDHiaXONGNAEjHyoMbR0Z74o7ujBdQRH+ENiyhFcejbpl2YfJKfWkYeS75WpUtG+BnoQ== X-Received: by 2002:adf:e5c5:0:b0:33d:274b:ffc7 with SMTP id a5-20020adfe5c5000000b0033d274bffc7mr9419456wrn.46.1709646264430; Tue, 05 Mar 2024 05:44:24 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id v13-20020adfd04d000000b0033d202abf01sm14937659wrh.28.2024.03.05.05.44.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 17/18] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Tue, 5 Mar 2024 14:42:19 +0100 Message-ID: <20240305134221.30924-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-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, 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é --- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 6 ------ 3 files changed, 11 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 952174bb6f..bdc640e844 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2018,9 +2018,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2666ef3808..0e3ad8db2b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7905,8 +7905,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 42970ab046..571cbbf1fc 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4344,12 +4344,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending = 0; events.smi.latched_init = 0; } - /* Stop SMI delivery on old machine types to avoid a reboot - * on an inward migration of an old VM. - */ - if (!cpu->kvm_no_smi_migration) { - events.flags |= KVM_VCPUEVENT_VALID_SMM; - } } if (level >= KVM_PUT_RESET_STATE) { From patchwork Tue Mar 5 13:42: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: 13582451 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 F1F94C54798 for ; Tue, 5 Mar 2024 13:46:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV77-0005Fh-OP; Tue, 05 Mar 2024 08:45:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5v-0004Py-9v for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:38 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV5t-0004J2-J4 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:35 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5131c48055cso875969e87.1 for ; Tue, 05 Mar 2024 05:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646271; x=1710251071; 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=iOxnYUajpBTpGKSyr9S0Yy8S7gw3p/1QBOxX+w9BDyM=; b=BcGyntElQvi+nCVmOH8W61Vrfi0XwkkwMs6sOzD5ShzIlU8Q57BR05UnfP7SG4dF2W QI2JvQkx+LVvUGSNAros4rktqbFb9JxNEIDa+ISG5hnZ8i668bFxSYO4tuFBzRU2LfVO S9mljKrttARTE7KMQrHVXvBhaSUVOUF1kQG0v/II2MTSO9cjLnddQJTVnlQeRJhr6DcL 9wmNtiwCoG6IEutzJpumIpmwbHaJ6T5w11yR1i+PpJ+B23ed8Z+XAUUI7cCFL9MggpNK Qu4b/YG2RFobv6r7pd3Oh9dToibTWqb3nSqf+epmm4JztumZMRVocRcHVtO9yRyO5IpX ZRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646271; x=1710251071; 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=iOxnYUajpBTpGKSyr9S0Yy8S7gw3p/1QBOxX+w9BDyM=; b=AWI/1fI+9ojMEXn4t5KkBNHIPvsf9t5q9t539akRX5bT7U24wz4s6AckAue2X0py8f G/2XTsdXeiikEQpMBjcEQb1LbVOJGgepbi2ajY4K/beLuuanWS+FX5jKsnMSfZBmlVtS 3y9RboJPAhpMnMKQtNFB6spM+uak2fgda0dZOX4MsJ+CGucZGqSnKerDfXTfnWxUmL3S Ef3OmomZlCeSHNSRnhukAZ4HyGVFem33DsSlThJkpbHPNtaL6zqWlvThJnOeg0iVEW8n qbzYn8XjWMTJVrcj3iyQl1v7j9+6Y2T3uYrV5K5r1wVmzcJoeJxq2XH6r9cspZn5a2ta cz0Q== X-Gm-Message-State: AOJu0Yz1C17JKajbA/WsNMldtC4BFY3307QFPWlun5OiJEF6hOJ5o1Da titpcP1edhivZAsG4Jep/YChz9INpUDgxpLGbl+P42EbkI4ckOmayb2Wn9zXCN/YMMzzr8s/Gii v X-Google-Smtp-Source: AGHT+IHpOzBhI25sZswJgzVD41rB8MjyWnj6iLrgSAs150NP2za1mp4EKVUQTwD9LVaUetj1tdSnbA== X-Received: by 2002:a05:6512:10ce:b0:513:588a:260f with SMTP id k14-20020a05651210ce00b00513588a260fmr510188lfg.38.1709646271091; Tue, 05 Mar 2024 05:44:31 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id bu16-20020a056000079000b0033dc3f3d689sm15142258wrb.93.2024.03.05.05.44.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 18/18] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Tue, 5 Mar 2024 14:42:20 +0100 Message-ID: <20240305134221.30924-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b4a9ea46a3..2e57a1b5da 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 4b9f4c5c2c..ce9e6b6272 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,6 +256,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_ACPI_DATA_SIZE: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_ACPI_DATA_SIZE (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -652,8 +662,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") || @@ -987,8 +996,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->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true;