From patchwork Wed Jan 15 23:22:27 2025 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: 13941032 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 78006C02183 for ; Wed, 15 Jan 2025 23:26:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCiy-0000Ca-BA; Wed, 15 Jan 2025 18:23:00 -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 1tYCiw-0000CJ-Cx for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:22:58 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCiu-0003o5-ME for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:22:57 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361815b96cso1499445e9.1 for ; Wed, 15 Jan 2025 15:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983375; x=1737588175; 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=cKmVNIOgWlXT/e096XKWejYp/y/Q1no7+NWLlivSSq0=; b=yeSzF+woKbfp0POCvIeU9aulYFu6uRiJKVqvx5P0ecxaZaLU113SuOM5BRK5ClqDCu FvPC31DuHkHbXMmRbOhtY7/5te/6jgf6/51mPWg5C7751adKBSv7ol23gn/BpQdPUx/1 yXRx5uWBrga1i2qHLAXjaqwvIY5LkM+VviE7z5x3q25JD9hfddz9sKPBY7jJGM5tWmsa C8+kvkWrRXvCfOOyrtOyZQ+QwXqst6FaO7pd0T04gUlO4h1PMcMEvHi70qGtNvjCJr0D Qn1JjxQw+PKlErYvUyx4g2HgqcOG/w0QlPZ2BuS66yxBpdxCqhu2JjKsWADtsNBL8mld 0Q4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983375; x=1737588175; 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=cKmVNIOgWlXT/e096XKWejYp/y/Q1no7+NWLlivSSq0=; b=Y3FDtk5F/JRdP7CoXgPJOgOWK6CwtWavssAyYjjl3dkheqLkJ3tYaZmXcwcAygTxE7 5yH4F2V3FSS19xPv5As805KW+oXppF283krwaizwOK8YaxUV+pgnmg6jBJTlbRUYMcpK 83M0JIKkOkIqZYAgz1K3W6iN9TlhG467YJ8cac9qqI7eNU/sOjem2AvsMEzURhs4XEku XFJ5wlAgVujB6jiPsOfK5lmMRT1WSo0MjU75j0ekkLNNMUMdqTnGcPOZGblLjaxzQZxy XVwYn7H5Xe4KDI5py3FCJw7FCIeiCvSOaBlTWKOC781cXWQQUrEcxWt6ng48ogCGMJWF ILjg== X-Gm-Message-State: AOJu0YxnxRhvQvxCHxOmXKSXec9aIBLf+LbWDYrEBDJrCEgtMlYoDKzF AIJ7XOb0h/uABKUZTaZwecKvFUjs3RByHfiwfK0CEzKJ8oekQW+usH7A74xFz8pOXKJfYhi19ed uKtk= X-Gm-Gg: ASbGncvF3GHchyc4cmZahlkF577tFtIEyjIFGyKW6s30RGvpntZFARKEZjPtoRpq8mo z1nYU4gaWwAovwFRVYDd/Cl+rBsl5EGHN7H3Wm/8wvSatYCrzutLkE6j5J/nEPC/kEBlmB/7GSe 1RFKHiEitMOXQbW1ZZDdE4W6zgDr5q184nKLpFv2CC0iEXZ6a6D1CMewS3HOZ6tHQIeI2ro3kkc jzvuQ/JdEiPdcVB/xzQOPnzpqDFtZo6YsEt5aPIqhObyp2BS0x8wWNC9iobVhCA/NFxCzfJcXjE e4duyDc1ptaoOzPgwHlLXHNON7ZcbCA= X-Google-Smtp-Source: AGHT+IErE8SySGP0TXR81cK6bY2M7EahM9uwwk1gFCRsBp38iuT9Mnswxmwdk1AVWwi6910RGtch/A== X-Received: by 2002:a05:600c:4586:b0:431:44fe:fd9f with SMTP id 5b1f17b1804b1-436e26f041bmr253028015e9.23.1736983374822; Wed, 15 Jan 2025 15:22:54 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38bf78sm18646504f8f.48.2025.01.15.15.22.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:22:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 01/21] hw/i386/pc: Remove unused pc_compat_2_3 declarations Date: Thu, 16 Jan 2025 00:22:27 +0100 Message-ID: <20250115232247.30364-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org We removed the implementations in commit 46a2bd52571 ("hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine") but forgot to remove the declarations. Do it now. Fixes: 46a2bd52571 ("hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine") Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index a558705cb9a..103b54301f8 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -302,9 +302,6 @@ extern const size_t pc_compat_2_5_len; extern GlobalProperty pc_compat_2_4[]; extern const size_t pc_compat_2_4_len; -extern GlobalProperty pc_compat_2_3[]; -extern const size_t pc_compat_2_3_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ From patchwork Wed Jan 15 23:22:28 2025 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: 13941018 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 EF685C02185 for ; Wed, 15 Jan 2025 23:23:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCj5-0000ET-W6; Wed, 15 Jan 2025 18:23:08 -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 1tYCj4-0000E3-NF for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:06 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCj1-0003p0-0l for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:05 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-38a25d4b9d4so201888f8f.0 for ; Wed, 15 Jan 2025 15:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983381; x=1737588181; 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=Mjrt+h0wE8tMpMJFIByyz0AtYhg5PsHPp+wMY17/Vb8=; b=M+WElkCMmF6dTjv5d/CSXTTOYZOJPLgNxQV8u/JTgp7dbdzHjywAu0A3f39a2meOOR islwH8gz7RkrUzW32IjVt5kKwL7UG2FvIuwyF+SQ4nYJjT2ES6D0AmKXHDvEV4pt20Lz 7vnhU7I7nR9TWWKy0iV2wfT+RbnglXjmZ2W3jNqcJuOl6JOUm4eK46Ai0ZeWgfRl4KvT ROtKbttCp8O8VfN2UrLzvIeZd1+IW0ZU4mDvA5JrP28RfilN8lvaDs0Bk9irx1TbGeJp VTxZWWQJGyBdTpHI2Mrzde7bLibSztuGcFITNytizC3YAkox7yETZvzdOaH8Ad/9uW80 KapA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983381; x=1737588181; 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=Mjrt+h0wE8tMpMJFIByyz0AtYhg5PsHPp+wMY17/Vb8=; b=F68zFnjyo03iPEk03S9MuAmznw/WN3pRQ1c+f2exNvzqKRjkyGmmHomcsH8diVmIsc o0UTFivWh6UqBVpJoUEKQPEvzqWU/ZuIFPJgIK1FAxag967AF6coD1Vgq6Ke41nB6N+9 tBV63WeMOkgiZUOb6gzcxFidF6cHU4BfeRXfEwwQNl9wdZrvBQHEd1+RTOobnxaTx84G e4qyqlmxTNKPs4zsXlM0mpovl7LLrp5XX67OHFk2dzn+6K4lMl3TFUO0OdgyGFcm2hk8 VRbUMGsCjrpGh+Xg9qLvHlk/CeoGC8QHUsKQ6GpFlf0BW5Mh6id2uYQxozTKUpKa4RhV XRaA== X-Gm-Message-State: AOJu0Ywy7i2CxblNWqLRyiL5wCsFQ/vUqzD6J3jke44mre6a6MQv0gKy KOD7vwl6EkCW6RaS71PJ6p0KYCbirdAnbCCtHyuO7bA8Gs9OfIZs7jNqsDRFnkhBTBBxrGnxUmu 1sow= X-Gm-Gg: ASbGncv4oIU/6kfJ8bNwXmZnxgHWc9h6mY+lCOyDKft4uuZP4sAMvw5RnpcYGiu/L5t nYWGHKPJjfUg9It0Lx86OlraH9OPYOy+iTgciF2gbfubbjUs0f0xJCF3uH4jt4oktg0rcQEpJm9 teyNBwFJVkgahFneafkoJUQCFoU67qzYwLIjHBm1odqkRe/7/dHkjN42hoq6emhV1IWFXpag3q1 wLcxrgvVUcV50tFAufbW4I2aFmXifuYxC8Zy8lD/YLY1LUwLAuYBvLq99b3CarMu3a/DqZZD5ZF l6hqOMpChzjcNNU/rwkJ8i62L8racB0= X-Google-Smtp-Source: AGHT+IFpiFwVXNqaLM/t0gWKima8MRRv3gahn3Zg36+POf8tR8zRnnw+jdkDIT708GkcB9pcfqaMLw== X-Received: by 2002:a05:6000:1448:b0:385:decf:52bc with SMTP id ffacd0b85a97d-38a872ea782mr27194293f8f.32.1736983380584; Wed, 15 Jan 2025 15:23:00 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74ac5f9sm37984425e9.11.2025.01.15.15.22.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:22:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 02/21] hw/i386/pc: Remove deprecated pc-q35-2.4 and pc-i440fx-2.4 machines Date: Thu, 16 Jan 2025 00:22:28 +0100 Message-ID: <20250115232247.30364-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/removed-features.rst | 4 ++++ hw/i386/pc_piix.c | 13 ------------- hw/i386/pc_q35.c | 13 ------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index c6616ce05e5..e4bdb385a25 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1012,6 +1012,10 @@ This machine has been renamed ``fuloong2e``. These machine types were very old and likely could not be used for live migration from old QEMU versions anymore. Use a newer machine type instead. +``pc-q35-2.4`` and `pc-i440fx-2.4` (removed in 10.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''' +This versioned machine has been supported for a period of more than 6 years. + Raspberry Pi ``raspi2`` and ``raspi3`` machines (removed in 6.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 04d2957adcd..64c1ab5ff3f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -780,19 +780,6 @@ static void pc_i440fx_machine_2_5_options(MachineClass *m) DEFINE_I440FX_MACHINE(2, 5); -static void pc_i440fx_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_machine_2_5_options(m); - m->hw_version = "2.4.0"; - pcmc->broken_reserved_end = true; - compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); - compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); -} - -DEFINE_I440FX_MACHINE(2, 4); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 77536dd697f..847f56263f3 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -674,16 +674,3 @@ static void pc_q35_machine_2_5_options(MachineClass *m) } DEFINE_Q35_MACHINE(2, 5); - -static void pc_q35_machine_2_4_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_q35_machine_2_5_options(m); - m->hw_version = "2.4.0"; - pcmc->broken_reserved_end = true; - compat_props_add(m->compat_props, hw_compat_2_4, hw_compat_2_4_len); - compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); -} - -DEFINE_Q35_MACHINE(2, 4); From patchwork Wed Jan 15 23:22:29 2025 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: 13941020 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 E0B63C02185 for ; Wed, 15 Jan 2025 23:24:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjA-0000FS-RM; Wed, 15 Jan 2025 18:23:12 -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 1tYCj8-0000F2-V3 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:10 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCj7-0003pT-39 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:10 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3862d6d5765so164680f8f.3 for ; Wed, 15 Jan 2025 15:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983387; x=1737588187; 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=d9FN0qJ22bg0qGnD5rjIKTXdHjku/v+6uYThnjNFqFg=; b=F2xVcYjt+x+VH3H6+KZY3o+wL1OA85s71X5rt//4NCfJVuRfB/UR/ei+oasZBgue7U M66AWo3vh1hU2ESjKtdiJWL1FFnHD5lto4Sc1yAeymGTbeBeaScoFbt5t6Kv3UJceiYU Ysk8IhHCTGhjnGDpt30SJIaWTr1aLSPjKGtB2Goy4OKq6AZaUH9IGkH1/BgCMBYaP2Fe ZEvX1BUIaw6bqXxV7AqwvI6Y6loyb7cXKt2mqoikpbIRgua4ru7T8ZpYpHLqiM/na90Q ajEMY4MbMvZjwbFCvRlE+SeGmyIQsrsS1utnHpBYbeOxVqSId/d8zt0mO/nomxWxm3bl tzzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983387; x=1737588187; 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=d9FN0qJ22bg0qGnD5rjIKTXdHjku/v+6uYThnjNFqFg=; b=lMx2RMp+0ppeM61x7WCo+87hfjxdColoXhXJItRg6qoZXA9yVQbOHTH57TwwVdzydY nWJqmUZQs20fVK5tMIc5cL1Fbpy86+3MoUL9qJ9/XQivBgnlsOGUlUXIaCG7xdE+vc+Q Y3uvIp0F4a5se9Xa3Wk4ii8GxdUKlRXDXjN830wkyt5oELBYeXapoZsJsdiV9rneCeAp ERFtu2B48iMcx3cK5G7DsZ0+9eUBYwaE2WKV3AGklxCEnle4FWRuUa5QOjVKJ+eva5yr P/iMYW5E9yn70Fion8mNQoA2F9dWcVAfpHFuIz3QOyyICSxyJd2JFMTZGA1B96P0o0YF qWbA== X-Gm-Message-State: AOJu0Yw7ryUuY5RgxusfDw3LDG399t2ja26FbVwHzwTsvV/8BuhLIUDA qdzU2eG5VFwK6oZoBhCsB0IJxNeXJab1gkAj3QvfiHxyXPTemjGB6mBrXfjlgYoIAa1pVQzl7fT WIIw= X-Gm-Gg: ASbGncuNI7Q2ZED+5nIJXLUVaWYFH5BCwjqYzjcr7cMiCeMIXxX7nWh/RVl2uVLHeV/ kD/jSpxM5U/wZvy5ROQCZkfMMPyuBccrIf0KuQN7nEUnEFpLiHCNMmBzj/+CsNLApxFoXv6d517 aIIv5FPVjSxc7E+STqEi/PaP0LLntAoHdTMMijYfpltp9KZI4bUw9H5FsnTwKVmNnq8h1jaRW5J 3QFScgQ4YPBGyDAZ07ZuWvJtQJPl8HeKDWtC24baQsDVuo9mhuhEJhDG04jJ/2f56IGro3AFW3R sKbQqru9+1pBU7ZXSAkqiFlQUgrdjhs= X-Google-Smtp-Source: AGHT+IHfRdzsNdSSx/psFMJNDEUC9uhsLiPN2YFVUCodqTxoZhMflfjkT/TXkCm/r9aiCZeV1RtQZQ== X-Received: by 2002:a5d:584d:0:b0:386:4a16:dad7 with SMTP id ffacd0b85a97d-38a872d2a33mr30326533f8f.10.1736983387087; Wed, 15 Jan 2025 15:23:07 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38c7aesm19207819f8f.53.2025.01.15.15.23.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 03/21] hw/i386/pc: Remove PCMachineClass::broken_reserved_end field Date: Thu, 16 Jan 2025 00:22:29 +0100 Message-ID: <20250115232247.30364-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 PCMachineClass::broken_reserved_end field was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it and simplify pc_memory_init(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 103b54301f8..7fc34bb4a34 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -107,7 +107,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool broken_reserved_end; bool enforce_amd_1tb_hole; bool isa_bios_alias; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9334b033f65..bf5308160e4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -994,14 +994,13 @@ void pc_memory_init(PCMachineState *pcms, if (machine->device_memory) { uint64_t *val = g_malloc(sizeof(*val)); - uint64_t res_mem_end = machine->device_memory->base; - - if (!pcmc->broken_reserved_end) { - res_mem_end += memory_region_size(&machine->device_memory->mr); - } + uint64_t res_mem_end; if (pcms->cxl_devices_state.is_enabled) { res_mem_end = cxl_resv_end; + } else { + res_mem_end = machine->device_memory->base + + memory_region_size(&machine->device_memory->mr); } *val = cpu_to_le64(ROUND_UP(res_mem_end, 1 * GiB)); fw_cfg_add_file(fw_cfg, "etc/reserved-memory-end", val, sizeof(*val)); @@ -1039,9 +1038,7 @@ uint64_t pc_pci_hole64_start(void) hole64_start = pc_get_cxl_range_end(pcms); } else if (pcmc->has_reserved_memory && (ms->ram_size < ms->maxram_size)) { pc_get_device_memory_range(pcms, &hole64_start, &size); - if (!pcmc->broken_reserved_end) { - hole64_start += size; - } + hole64_start += size; } else { hole64_start = pc_above_4g_end(pcms); } From patchwork Wed Jan 15 23:22:30 2025 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: 13941015 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 227F1C02185 for ; Wed, 15 Jan 2025 23:23:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjF-0000H6-Vh; Wed, 15 Jan 2025 18:23:18 -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 1tYCjD-0000G1-9c for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:15 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjB-0003pr-RB for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:15 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361815b96cso1500465e9.1 for ; Wed, 15 Jan 2025 15:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983392; x=1737588192; 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=L0j4K60G/+NPzfBz6VwUPX3RpYVnufxaRC/J6EqkjwQ=; b=OeAwRl8R1DtjiYSUEYn6GRIvLzX4adm566pH8ICfsYY3+H1J15ECdPWRrYxx/zIbYD CMbAlfzeOaBPW87gzxBxC8rCQRk2DzRRe2PE5Xi24GG27wqBC5W9S9CRf7tTNXQ0Om5h LYYwhaXtWBar0tdzKGe15D5ev7knPv9Xhgp6/m3ZanlJtO+Hf1wnP2t9D99JpeOYPdh3 KnS6lvpRP8IBu9wTT8lUSym7caHiuk1BR02aDGwUD7OuZnOUkle8WuuweO2Ydaa66w5N yTbm9XmWeVKQZhaQDceXBEnwbMaInAAZ9ydE7Vbne1a4iJZTWbkl3dSr7witbPoqjyXv LlwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983392; x=1737588192; 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=L0j4K60G/+NPzfBz6VwUPX3RpYVnufxaRC/J6EqkjwQ=; b=EOe6F6CSI34PZ4NL8+WO2DTlBCjyNQjin2C8bngG4eaCh700KdnbF+TwF6sNOYN8D6 W/fZ7Pnnm10IZWq75jUbQqFBhvhHHq/XXBj1jaYCSbnaJQ0/xo59zQKVWYmteJFZp8Un NKJB1aS2yGEyJqtT2/M3uTG+tsEDYn30wZd1p9hlZwgbsWX1rMbbWAkviX6E32rbJNzA QoGDMsnvXaAkaqjKcrG01/MOFx4A4fJTptc8eLyBB1+WvfTpPraUSNniyy6JXSKyDSk6 7MfQ/EHFWCGt6lNbWCRFYPQwnSfAyAZyhG8ZzhWVYcDuYR5WkQlLPtsbYF1kTYHk/Jqj vLgA== X-Gm-Message-State: AOJu0YzDo2MmYd8BbzT4qedg+CQ3Naec9qZebic8Jx8DRoMSzjOM4PAR i9GFuGYQInNurknNY9p3QvdBZvSvQLLCt32XUZMELCaHjhOlswLmT0zKPxzrDuW4Lqp4lQxBuCR htyQ= X-Gm-Gg: ASbGncuF+BPqMfFcdzbq6VydsJFy8mGy/6c9uHfmAVmGK5nu9Qfvtbd7RaOwLcK+wum i5YGz/TKxu7qk7dGPIgv2CvBCgJe/l98AlrWNSa0EtCVoM4bSa0R9QWCkdu9M5pl+ineiRywe71 pvk6v9tO4QmDcI+r+wkcW8Bllylkh6zKIwyBUE3s0WvPKgo/mkr/dMS5l7dvYxw3CsmuE77OJnn u9lB6tqP4UW/jX8pgRbIMurAr+fNGG0wP2XxARAKNBSfcFhGIx+mnoURMWbe8zIqh4YszcSR/55 ElOiKZxO/k6+yaaxB9o6uoasztyvlH4= X-Google-Smtp-Source: AGHT+IG5m+ucvFC6ezRuwfSJFcIil8xHuKtwE8Itvgp5ddw3WTU47NgNTI23V7VI/jcyvo/67IxqNw== X-Received: by 2002:a05:600c:4ecd:b0:434:f335:83b with SMTP id 5b1f17b1804b1-436e269723emr313900205e9.5.1736983392101; Wed, 15 Jan 2025 15:23:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c749989asm39785625e9.2.2025.01.15.15.23.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 04/21] hw/i386/pc: Remove pc_compat_2_4[] array Date: Thu, 16 Jan 2025 00:22:30 +0100 Message-ID: <20250115232247.30364-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The pc_compat_2_4[] array was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 19 ------------------- 2 files changed, 22 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 7fc34bb4a34..31e799061ef 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -298,9 +298,6 @@ extern const size_t pc_compat_2_6_len; extern GlobalProperty pc_compat_2_5[]; extern const size_t pc_compat_2_5_len; -extern GlobalProperty pc_compat_2_4[]; -extern const size_t pc_compat_2_4_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 bf5308160e4..6d0c9014d63 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -257,25 +257,6 @@ const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6); GlobalProperty pc_compat_2_5[] = {}; const size_t pc_compat_2_5_len = G_N_ELEMENTS(pc_compat_2_5); -GlobalProperty pc_compat_2_4[] = { - PC_CPU_MODEL_IDS("2.4.0") - { "Haswell-" TYPE_X86_CPU, "abm", "off" }, - { "Haswell-noTSX-" TYPE_X86_CPU, "abm", "off" }, - { "Broadwell-" TYPE_X86_CPU, "abm", "off" }, - { "Broadwell-noTSX-" TYPE_X86_CPU, "abm", "off" }, - { "host" "-" TYPE_X86_CPU, "host-cache-info", "on" }, - { TYPE_X86_CPU, "check", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "sse4a", "on" }, - { "qemu64" "-" TYPE_X86_CPU, "abm", "on" }, - { "qemu64" "-" TYPE_X86_CPU, "popcnt", "on" }, - { "qemu32" "-" TYPE_X86_CPU, "popcnt", "on" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "rdtscp", "on" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "rdtscp", "on", } -}; -const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables From patchwork Wed Jan 15 23:22:31 2025 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: 13941023 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 E4EF6C02180 for ; Wed, 15 Jan 2025 23:24:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjQ-0000QU-8v; Wed, 15 Jan 2025 18:23:28 -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 1tYCjI-0000Ja-Gf for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:21 -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 1tYCjG-0003qM-VL for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:20 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-38789e5b6a7so203820f8f.1 for ; Wed, 15 Jan 2025 15:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983397; x=1737588197; 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=HiK7kWV2YxErB75r1QBmNlphCk6c+f8aCYytVgiOb3Y=; b=aP4cuog0Baamh/hg4i/i8jm1SUiLSDpal1AmNASjt8X/A87qx3wyoXGk0T0pjJBb8w l/2ATZB9sF/lxbJ4tjE6++RLhoNt3my6fkX98SNvsf9z/nkCSRQhLKLyvyAWKtvNXLhI FFozDGAspABnSiIJbiZ30yHVFyfMpQ6TEUpoAaaiW3twJ1xLzvdR//3yxxGqsVDkxcQq ZgecDEVkBHMEV2SsndSQBGs3o/E5fKUW5SIOwhu1O4H5aCShgWxuMBCCCGmvF9swYNqn 2dw7s3Zjh6zrR9Nu1/vr9k3Gz2CPNwqQsHeqBn14jI4hguKeaWONf9VSGmWb7AiOz/aq 21Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983397; x=1737588197; 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=HiK7kWV2YxErB75r1QBmNlphCk6c+f8aCYytVgiOb3Y=; b=Lge6mMpyUnr/LsYx90jmCjWa/zVYW8Gbo7yMI9rCo06ynA7Fc5yLjz2rX6VDH9WOwG eEoUA/0HCh2ENXqbs6SFp2HX1ybo0ZdCMV9mReM3DZ8OWjBuKR0ibGStUWGYjB0nCn33 SkwxmhwK/3uD/okzzgx8CRLB2KiaNEJO5Qtfu3ZltdNaH/85CUaEfoudWOFJvT2R/iT0 SDfR5KUd8Cs0JCZg4p+gQyJcMM9TyZK59/XUmD0YGt3Or8UB6LgsqEwcTGMVrErBmnAk nc3MsRF7R/0dtUA2wcukdcP8Ctw74iPBVMfydaWuePz46/mxIa0avY/qPIC8PBCHWVVx Hn3Q== X-Gm-Message-State: AOJu0YwoWspAUZY9Wywq8qZvuwlSHBAPQ6pWCOdMMrMALW19TxV27uvv kEWvVGqtQMit9pC3TMZjcAVUNZSO2rBFmZApWt8bLQZHv6V/EH+rQS81pZjyMLGSnl9QdhhmauR Q1Gk= X-Gm-Gg: ASbGnctu+SOOPza96ZNf27x2kte3rm98VogS1sA6eDPG2XcjoGifHE0q4INJ+Vd/YZZ EuPmHCQBGEyYkqAt8n9XxlvByKQBnpNwYjcWz768pBGTGF0CyZsvFtDpx4eqTR4E2Uk+1o5niAO 0wOLxwWay7CgzZqgL92yclVU6e/etYCYep7eBU2KrJx+hp2x1S7+uPqal+DsD5Bf/7bil5dGhOK nFRTVuWx0DSmfVV9f6Pe8va8vsQCoNlvAhK2OfETCussMaAs624x+YNGIEAgzPfTfaQFhMAL2u9 mzNJX8XGsgKzJ22qVragu2pbeB1fdWk= X-Google-Smtp-Source: AGHT+IF4aPTTANd00MhfnjjKHU9Z7l1eY0wyhqkRLgoKYUUb7vQyLWliC9eqwzg19q6RydsD/c5r0w== X-Received: by 2002:a5d:5c0c:0:b0:385:fc00:f5d4 with SMTP id ffacd0b85a97d-38a8730acf1mr25197093f8f.29.1736983396953; Wed, 15 Jan 2025 15:23:16 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1b44sm19019124f8f.90.2025.01.15.15.23.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 05/21] target/i386/cpu: Remove X86CPU::check_cpuid field Date: Thu, 16 Jan 2025 00:22:31 +0100 Message-ID: <20250115232247.30364-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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 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 The X86CPU::check_cpuid boolean was only set in the pc_compat_2_4[] array, via the 'check=off' property. We removed all machines using that array, lets remove that CPU property and simplify x86_cpu_realizefn(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.h | 1 - target/i386/cpu.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index dbd8f1ffc79..87917b7f895 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2091,7 +2091,6 @@ struct ArchCPU { uint8_t hyperv_ver_id_sb; uint32_t hyperv_ver_id_sn; - bool check_cpuid; bool enforce_cpuid; /* * Force features to be enabled even if the host doesn't support them. diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0b639848cd6..42227643126 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7822,7 +7822,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) } } - if (x86_cpu_filter_features(cpu, cpu->check_cpuid || cpu->enforce_cpuid)) { + if (x86_cpu_filter_features(cpu, cpu->enforce_cpuid)) { if (cpu->enforce_cpuid) { error_setg(&local_err, accel_uses_host_cpuid() ? @@ -8491,7 +8491,6 @@ static const Property x86_cpu_properties[] = { DEFINE_PROP_UINT8("hv-version-id-sbranch", X86CPU, hyperv_ver_id_sb, 0), DEFINE_PROP_UINT32("hv-version-id-snumber", X86CPU, hyperv_ver_id_sn, 0), - DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, true), DEFINE_PROP_BOOL("enforce", X86CPU, enforce_cpuid, false), DEFINE_PROP_BOOL("x-force-features", X86CPU, force_features, false), DEFINE_PROP_BOOL("kvm", X86CPU, expose_kvm, true), From patchwork Wed Jan 15 23:22:32 2025 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: 13941037 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 06D24C02180 for ; Wed, 15 Jan 2025 23:26:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjR-0000Wg-MS; Wed, 15 Jan 2025 18:23:29 -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 1tYCjP-0000QS-Kv for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:28 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjN-0003qk-SN for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:27 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-38a88ba968aso317347f8f.3 for ; Wed, 15 Jan 2025 15:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983403; x=1737588203; 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=KUxPrJq33zbqetS3KdsFfaEYg8U4Um6tBpvIBoEhOmo=; b=Urj+UI/cC7YzUcZ+zR42IsDEC9hphQP2YH++S6N6XS7N2q58MaHU08mIwUa53pTx9J 0g6bK4E1zjCL24bt1z6ao6urue9qZcqOP9087/BO/I/Amnh/rxfmPNL8SrkQoqXlg7AL iJRMD9YyONn1NDXV+NXTox4HSAS8foUSvfUj6oROnHxGnVLOrbvEyCODTBxkZszPaKVw N0WIzP8OtPKIyd/3cGilWe6YceSZnYyO5TEGeTWHbFCTERsxUoLZ8TG+Iblo5rGzbwHx 2B58ZBrfKrjLLkaR+qtQrwabvnKH72bzBBQ9T3f9nqIx78v6tvnsKUXsTmWsrLGMnwEX coiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983403; x=1737588203; 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=KUxPrJq33zbqetS3KdsFfaEYg8U4Um6tBpvIBoEhOmo=; b=ah6K8A2/Fohi4GCeTrIjCvdxpd6HGmyrPhrf+feqgzxJu0r1jEs6HvZVF5rcHgZMD1 XzXfMfcFQBcZU6BQ15Y+tGDOdc6UArcm1Jf8iwubyyvkxXWsfwYyr+tkx6yHhKuq4slp 9Xkp+LmFXZ6IqPNTyynWgZz9PfCJb7NiC9Br2AxPLYr5L9QO58/WxrgVMHndTlEmlzJ+ MnshXzLLluxcoD5p0bCZtrmXKfXuYb6zCvrgr3vjtZ2vVd4Q320Wpt0j9BHLU2oUnch7 SP4t6OA2M0RjTDCHbSNxhChwLhA2W0rkss+yBcEoB4H3uwGmLEiQrMaA9OK3b/oKK62O y/Fg== X-Gm-Message-State: AOJu0YzGS7cBQh5mgSDNiywIC/dOUb9UPFjFPC7/mRKDpRRa89LTCYzi 7psFoXEpbM/jjDaasuXStvRi5jnAUTdDKZTDJra6pCnX0tmINl3l8fwm6/BHfOuReEpb0Fh76vs VDVA= X-Gm-Gg: ASbGncsoonEt6CiK0a//CgYqqybaegiI4saOA/OCvQkGxBMhREeAbM5k2Mv8bV9i4Jj CKkodlhWrAI0lnUF4zAoHgT3VSVuMv/cWk88F0hNTElBTjd8dbvRLmpE27/eNJgv0pkkS1CELdj PGzt6s4iMOwwdWlGfLEul9BiNN7ZcJLC9o8wke+ZrgGEC+gIlE/muN4Q8KT2o0w4jRdHDJltnG4 Z6e2WHryjWhbu93a6uKdM1keQtSud0OutJcxk+pp57v9BSYa7P6g64TuwEguHHilxW5RlEAGLFp m7aoX+6Lvor5dlVUpQr+cbA8/lguZTw= X-Google-Smtp-Source: AGHT+IEAOL0BiVVPNhg3ZJxG+vdyKt8Dc59/uzDX0sZYzNdKS/ldU5vA9XjjgjfFWFSVTrqEOjY0mw== X-Received: by 2002:a05:6000:4618:b0:385:f560:7916 with SMTP id ffacd0b85a97d-38a8732aeefmr32429907f8f.35.1736983402754; Wed, 15 Jan 2025 15:23:22 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e3853b6sm18634302f8f.44.2025.01.15.15.23.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 06/21] target/i386/cpu: Pass Error** to x86_cpu_filter_features() Date: Thu, 16 Jan 2025 00:22:32 +0100 Message-ID: <20250115232247.30364-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Simplify x86_cpu_realizefn() by passing an Error** argument to x86_cpu_filter_features(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 42227643126..c48241fb902 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5896,7 +5896,7 @@ static void x86_cpu_parse_featurestr(const char *typename, char *features, } } -static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose); +static bool x86_cpu_filter_features(X86CPU *cpu, Error **errp); /* Build a list with the name of all features on a feature word array */ static void x86_cpu_list_feature_names(FeatureWordArray features, @@ -6084,7 +6084,7 @@ static void x86_cpu_class_check_missing_features(X86CPUClass *xcc, error_free(err); } - x86_cpu_filter_features(xc, false); + x86_cpu_filter_features(xc, NULL); x86_cpu_list_feature_names(xc->filtered_features, tail); @@ -7650,7 +7650,7 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp) * * Returns: true if any flag is not supported by the host, false otherwise. */ -static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose) +static bool x86_cpu_filter_features(X86CPU *cpu, Error **errp) { CPUX86State *env = &cpu->env; FeatureWord w; @@ -7660,7 +7660,7 @@ static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose) uint32_t eax_0, ebx_0, ecx_0, edx_0; uint32_t eax_1, ebx_1, ecx_1, edx_1; - if (verbose) { + if (errp) { prefix = accel_uses_host_cpuid() ? "host doesn't support requested feature" : "TCG doesn't support requested feature"; @@ -7712,15 +7712,13 @@ static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose) uint8_t version = ebx_0 & 0xff; if (version < env->avx10_version) { - if (prefix) { - warn_report("%s: avx10.%d. Adjust to avx10.%d", - prefix, env->avx10_version, version); - } + error_setg(errp, "%s: avx10.%d. Adjust to avx10.%d", + prefix, env->avx10_version, version); env->avx10_version = version; have_filtered_features = true; } } else if (env->avx10_version && prefix) { - warn_report("%s: avx10.%d.", prefix, env->avx10_version); + error_setg(errp, "%s: avx10.%d.", prefix, env->avx10_version); have_filtered_features = true; } @@ -7822,14 +7820,8 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) } } - if (x86_cpu_filter_features(cpu, cpu->enforce_cpuid)) { - if (cpu->enforce_cpuid) { - error_setg(&local_err, - accel_uses_host_cpuid() ? - "Host doesn't support requested features" : - "TCG doesn't support requested features"); - goto out; - } + if (x86_cpu_filter_features(cpu, cpu->enforce_cpuid ? &local_err : NULL)) { + goto out; } /* On AMD CPUs, some CPUID[8000_0001].EDX bits must match the bits on From patchwork Wed Jan 15 23:22:33 2025 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: 13941016 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 5A120C02183 for ; Wed, 15 Jan 2025 23:23:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjW-0000rn-VO; Wed, 15 Jan 2025 18:23:35 -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 1tYCjU-0000jW-85 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:32 -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 1tYCjS-0003rB-Il for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:31 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4368a293339so2427745e9.3 for ; Wed, 15 Jan 2025 15:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983408; x=1737588208; 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=snfcvZGJRSdw9CpfmPwjHfIiEi+hhZ6w0WHUO6QzqM8=; b=NaqZ5ZGJCn793ePZZGpzE1xVhksco6P6HZ7jhYbamNGX0q+qxdcxuREehfZhvmgwl9 bR/yw0jBCHYK76GYuHViAJIpcmjCQpXJuhjOyT4zfTN7C1aqRIuT389noBOO3wkuda3q UtPCp9HSykTgULtRGbDw8KO9sAY7TJZT9YdtTM/sHiVewLolnRXds3QPeAaSRtXaf+hM 9VRN+Rd9cyhI2KgFLTXabVmRxOpF9//vrw6Mi2oHBDSmwj5zj/4fv900E7sib2vIaEE7 jW1oI915LxGuZ7qWF2quNLYnsVpvCYBDTGE9HeABMz3iv77qOWUmwhvcqsorKKx4kP8a yIdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983408; x=1737588208; 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=snfcvZGJRSdw9CpfmPwjHfIiEi+hhZ6w0WHUO6QzqM8=; b=sMWYNIyiRz7xANoixsTruvl5PvkXTlOIMMpqaNwTc5xmPLOOWrg49MKGTdv824bGZt QkKHnXK9Y3rmZzdD5295MUdZY3bGST0K92FGX9PKw1m4tK2UgqbZmcP/XYS9YdyLCivt fXmMgIzeDInP1s1mJdnbOMfOeDmEuoFJTSDk98TY3C5Sf773W38nFgLvSCPDoItq+kZg 93IoTZkA+CP1ofYkarlOk8iqh+cYrJixGSwTImvrbo7qO/xbtX5RrnP1vYdgxbDe4A19 SlpQR90bT56x5/XVK9EFZIxsqR3KyMrsDGxVNszHqBcR9enn8KbxI6Cs4B7yFo0wWLja 1qFA== X-Gm-Message-State: AOJu0Ywuj6UdHsO04+xYcG7B459nHSXTjbLlWQyW2iU1h6OzoAvnMt3E bTWp7gcEaI0GDVFF8JNLo8Mq1H9haK51e8Pifwf+7AVng5tMgslI1FI7A3XQ4bZdgKhozpgOMtg Nnu0= X-Gm-Gg: ASbGncsU86OVFwIibOmAyROJl6HZ0twzVeiQNIEFDSyI4BSDKTaHojOC9VHWjqAPXfi vh+vetDCvVI62C3gN4PD0ZVxEag7lS//Yh+06jkX52JR9xjY0XTdsA4s2uQaIovivVaqQaygamw 2njikNK/rkHcCAxi2U4s5PYx8rtvsg8xud1MjfJRtmaNMlba0y5XiL9S6+2OA0yqBhFD7j8xPsp zi0J/czV1iDEOFInIk2XdG70I+ZIy94QzpdhvTbDKdnQ14Q3s0HsM/Vqe/HVJ4x9sCPC1WkiV6H +9FOkJS4SxKCH8obbQH4iEFcfk5OJTU= X-Google-Smtp-Source: AGHT+IHQc5Ghd4EK8DHjkTYR4yEJtRhumv72h7MlL7Hk9xcjNkchGaVDw8e2DaUQPfYGOptzP+syFQ== X-Received: by 2002:a05:600c:5491:b0:434:fddf:5bfa with SMTP id 5b1f17b1804b1-436e268626emr270176085e9.2.1736983408392; Wed, 15 Jan 2025 15:23:28 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7499878sm39944135e9.6.2025.01.15.15.23.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 07/21] hw/core/machine: Remove hw_compat_2_4[] array Date: Thu, 16 Jan 2025 00:22:33 +0100 Message-ID: <20250115232247.30364-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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 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 The hw_compat_2_4[] array was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 3 --- hw/core/machine.c | 9 --------- 2 files changed, 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 2ad711e56db..e9e33c57f27 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -841,7 +841,4 @@ extern const size_t hw_compat_2_6_len; extern GlobalProperty hw_compat_2_5[]; extern const size_t hw_compat_2_5_len; -extern GlobalProperty hw_compat_2_4[]; -extern const size_t hw_compat_2_4_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index c23b3994964..bdd4dee3d67 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -281,15 +281,6 @@ GlobalProperty hw_compat_2_5[] = { }; const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5); -GlobalProperty hw_compat_2_4[] = { - { "e1000", "extra_mac_registers", "off" }, - { "virtio-pci", "x-disable-pcie", "on" }, - { "virtio-pci", "migrate-extra", "off" }, - { "fw_cfg_mem", "dma_enabled", "off" }, - { "fw_cfg_io", "dma_enabled", "off" } -}; -const size_t hw_compat_2_4_len = G_N_ELEMENTS(hw_compat_2_4); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Wed Jan 15 23:22:34 2025 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: 13941034 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 916F8C02187 for ; Wed, 15 Jan 2025 23:26:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjb-0001FY-78; Wed, 15 Jan 2025 18:23:39 -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 1tYCjZ-00015D-0u for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:37 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjX-0003rp-6D for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:36 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so1475135e9.1 for ; Wed, 15 Jan 2025 15:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983413; x=1737588213; 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=LtVr4r34NQSIQO5b8dinugUm7VG2kyr9M3gSUVOEACI=; b=c1vEzXtqwVykYLPn1fI5agGsAcr9JAQA7oLPYXUKi2U8pUjSwSgYxgcIOkaAai6zdo yh2OWMOIG0/QYSawczdQ3hq0indRG0eFkeywl2HvQyEGoJv5jb8ceAisKHLFJCPWhOkD gT2m7RRzRJ/ZpEDYsPTAMqXum75kZVX1AbeUd4aZBzy+EJZYBnntiEC/7Gmi2Hr8jKzl MVyfbJGzOxtlXS6a6TSvI1YhXrzcSiOI7oIqF9PfDB8vokBdQ5gB2Z4bJoaNKNoas9Cr vQAioPXFTzR+gHAqdOtAGJSC/bLsLa+nYucOVJQ+pC5G3Qx/YIoyn3SXTo38utZ7CQ1J UVVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983413; x=1737588213; 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=LtVr4r34NQSIQO5b8dinugUm7VG2kyr9M3gSUVOEACI=; b=S5E+5IUsqvI4qa7IuZ6ByY+NOW0OVhaZqisOXB/zr0MXrDy5awRwR/TflE5vrqoA7M 8nTVDak5/fymv0hum4Zcj1f7GC+RfkmtA0lc+e0X5uUb7DxlYiH0ugDR+w2o0N5TSOSG DyJDeWqEiT9pPyWjjswsDUtGQNhz/zC45QdsfM2AfvHu52P9Dug6l0TYAg05l0eWJrWO z8BOgxmT+HkDm5hDC2WzIqv06kZ4pHIQEr1+GaEiHvxcO5IGGjc+7rITjnwSCCcSPNRH fWN12LOcbXOSHgt70m8DvTFb/YISWkLdztwcm71zf9Df2kmm2P7AqtuZ+xZPc5tYDnWh PX0Q== X-Gm-Message-State: AOJu0YwchH3XIat7MvJn1zd23mbPDiunDzsUZG2OMW2n8o/uclMtDLQy pNFboVacmVgh/e6srFYQ2bi759pK66X/BBBwMyl/p97NmrGy6PPqFxoFB1D5XcsNLpQA1h0MwLt z3Dc= X-Gm-Gg: ASbGncuu3yTbZCTObA3E5y94CEHFpzuXAPg/7Wtb4lg+eO8k+mX3fh4eeCzLWYGQe9S GkktCxjMIi9GVKGTyM2nJkQBX11xs99zMbWZTxo6P3JVtvhX0U8KwQ2VAE4/qmGWkMGqw6XZ5Qj 4o6w8TiR3fCo0Y9nrFKT0SOJkhvTunusbXuLMJY2dptGHREAhAdTD7UAUV41WM4nhiYRBmPon54 ctNWvjX3u6+H2dIax24q+suagsnfzzO+Jw8K4gVVSEEABMdkVU/UdFby2+ickw5uN5X7sIVIV1Z aiENflPKqpAsVMDzY18mV/NkvJkkBTI= X-Google-Smtp-Source: AGHT+IFqETvma2LLKyg0yB6yeVeoENyeDtumRwcDAA8uvIiSiSihe37ZvLYtPYCcoU1HDvdZVopRNQ== X-Received: by 2002:a05:600c:a09:b0:434:f1e9:afb3 with SMTP id 5b1f17b1804b1-436e267863emr268361935e9.3.1736983413393; Wed, 15 Jan 2025 15:23:33 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c749935fsm39309645e9.3.2025.01.15.15.23.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 08/21] hw/net/e1000: Remove unused E1000_FLAG_MAC flag Date: Thu, 16 Jan 2025 00:22:34 +0100 Message-ID: <20250115232247.30364-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 E1000_FLAG_MAC was only used by the hw_compat_2_4[] array, via the 'extra_mac_registers=off' property. We removed all machines using that array, lets remove all the code around E1000_FLAG_MAC. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 63 +++++++++----------------------------------------- 1 file changed, 11 insertions(+), 52 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 3d0b2277039..14d2133cd80 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -127,10 +127,8 @@ struct E1000State_st { QEMUTimer *flush_queue_timer; /* Compatibility flags for migration to/from qemu 1.3.0 and older */ -#define E1000_FLAG_MAC_BIT 2 #define E1000_FLAG_TSO_BIT 3 #define E1000_FLAG_VET_BIT 4 -#define E1000_FLAG_MAC (1 << E1000_FLAG_MAC_BIT) #define E1000_FLAG_TSO (1 << E1000_FLAG_TSO_BIT) #define E1000_FLAG_VET (1 << E1000_FLAG_VET_BIT) @@ -1218,46 +1216,17 @@ enum { MAC_ACCESS_PARTIAL = 1, MAC_ACCESS_FLAG_NEEDED = 2 }; * n - flag needed * p - partially implenented */ static const uint8_t mac_reg_access[0x8000] = { - [IPAV] = markflag(MAC), [WUC] = markflag(MAC), - [IP6AT] = markflag(MAC), [IP4AT] = markflag(MAC), - [FFVT] = markflag(MAC), [WUPM] = markflag(MAC), - [ECOL] = markflag(MAC), [MCC] = markflag(MAC), - [DC] = markflag(MAC), [TNCRS] = markflag(MAC), - [RLEC] = markflag(MAC), [XONRXC] = markflag(MAC), - [XOFFTXC] = markflag(MAC), [RFC] = markflag(MAC), - [TSCTFC] = markflag(MAC), [MGTPRC] = markflag(MAC), - [WUS] = markflag(MAC), [AIT] = markflag(MAC), - [FFLT] = markflag(MAC), [FFMT] = markflag(MAC), - [SCC] = markflag(MAC), [FCRUC] = markflag(MAC), - [LATECOL] = markflag(MAC), [COLC] = markflag(MAC), - [SEQEC] = markflag(MAC), [CEXTERR] = markflag(MAC), - [XONTXC] = markflag(MAC), [XOFFRXC] = markflag(MAC), - [RJC] = markflag(MAC), [RNBC] = markflag(MAC), - [MGTPDC] = markflag(MAC), [MGTPTC] = markflag(MAC), - [RUC] = markflag(MAC), [ROC] = markflag(MAC), - [GORCL] = markflag(MAC), [GORCH] = markflag(MAC), - [GOTCL] = markflag(MAC), [GOTCH] = markflag(MAC), - [BPRC] = markflag(MAC), [MPRC] = markflag(MAC), - [TSCTC] = markflag(MAC), [PRC64] = markflag(MAC), - [PRC127] = markflag(MAC), [PRC255] = markflag(MAC), - [PRC511] = markflag(MAC), [PRC1023] = markflag(MAC), - [PRC1522] = markflag(MAC), [PTC64] = markflag(MAC), - [PTC127] = markflag(MAC), [PTC255] = markflag(MAC), - [PTC511] = markflag(MAC), [PTC1023] = markflag(MAC), - [PTC1522] = markflag(MAC), [MPTC] = markflag(MAC), - [BPTC] = markflag(MAC), - - [TDFH] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFT] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFHS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFTS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [TDFPC] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFH] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFT] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFHS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFTS] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [RDFPC] = markflag(MAC) | MAC_ACCESS_PARTIAL, - [PBM] = markflag(MAC) | MAC_ACCESS_PARTIAL, + [TDFH] = MAC_ACCESS_PARTIAL, + [TDFT] = MAC_ACCESS_PARTIAL, + [TDFHS] = MAC_ACCESS_PARTIAL, + [TDFTS] = MAC_ACCESS_PARTIAL, + [TDFPC] = MAC_ACCESS_PARTIAL, + [RDFH] = MAC_ACCESS_PARTIAL, + [RDFT] = MAC_ACCESS_PARTIAL, + [RDFHS] = MAC_ACCESS_PARTIAL, + [RDFTS] = MAC_ACCESS_PARTIAL, + [RDFPC] = MAC_ACCESS_PARTIAL, + [PBM] = MAC_ACCESS_PARTIAL, }; static void @@ -1419,13 +1388,6 @@ static int e1000_tx_tso_post_load(void *opaque, int version_id) return 0; } -static bool e1000_full_mac_needed(void *opaque) -{ - E1000State *s = opaque; - - return chkflag(MAC); -} - static bool e1000_tso_state_needed(void *opaque) { E1000State *s = opaque; @@ -1451,7 +1413,6 @@ static const VMStateDescription vmstate_e1000_full_mac_state = { .name = "e1000/full_mac_state", .version_id = 1, .minimum_version_id = 1, - .needed = e1000_full_mac_needed, .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(mac_reg, E1000State, 0x8000), VMSTATE_END_OF_LIST() @@ -1679,8 +1640,6 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Error **errp) static const Property e1000_properties[] = { DEFINE_NIC_PROPERTIES(E1000State, conf), - DEFINE_PROP_BIT("extra_mac_registers", E1000State, - compat_flags, E1000_FLAG_MAC_BIT, true), DEFINE_PROP_BIT("migrate_tso_props", E1000State, compat_flags, E1000_FLAG_TSO_BIT, true), DEFINE_PROP_BIT("init-vet", E1000State, From patchwork Wed Jan 15 23:22:35 2025 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: 13941025 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 5641DC02183 for ; Wed, 15 Jan 2025 23:25:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjg-0001es-5j; Wed, 15 Jan 2025 18:23:44 -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 1tYCje-0001d1-Rd for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:42 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjd-0003su-2a for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:42 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43626213fffso8865245e9.1 for ; Wed, 15 Jan 2025 15:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983419; x=1737588219; 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=OuY7XK/c0FM5xJPshFmNC9eVlLzvGQYZs65GXrUSy+M=; b=vNBMtishQtPP/t538Uo+Ff72aptiBcuLeCTWDGokhQY7OSTuWG0ZeQQJRSUwyb7Yg/ VbwkRe5ZHiME4gYGRNLD4vlmIKqvA8gLJtCHjmS/WfxbtOEjzbZGMkLWr2s04x8l/cZB eeI0BuymsPVIsW8McDb729KAaYq43Ihnx+fLYIcPhXGdy3LL6zWWqQL3MPMoVHKCdXKa FW0be2esMvOrm+6p4Zzf3HVnBvzNd7e125OXjO/jlaeSMZoiNdyK7KPAWOgTSOXdMOC5 6Vw0YiAHb9Ytoe433xV95uaRUsgv7nQPNs51VEsx71LRYkC7k49+lloh9iy4XyfXnMpW kLRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983419; x=1737588219; 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=OuY7XK/c0FM5xJPshFmNC9eVlLzvGQYZs65GXrUSy+M=; b=WKfS/nxl84dgNnWtbcOKCapQI3GFd/w3MAjCOJZQKDFcPEX/bxTlAw3Ex5zZpqCyfM LrYpQv3lMV4h4W3pTIW35iRe1HYYwmvgijDcFTAc2DTYdPOQSsFnbrpg9pnoMVeTuqBV xcuj8bUmAmKpOBd24TysDfEYkTkymUi46DpSjDbY2A0WB16OBmW35WoduBTR7/AyE4vt 2FUYoneP2M82ldZ9/yx5H+V2cWN5jl9RF61E9BuSoaDLF578vB1yjE8zVmYiQUkq7eZq AnGswGAhZH/sPkCQxc/dKvTAigO8O/E2/J/IKfuqUeGOMW5YJ7jJ2vH5EfBRSxq5Jr6L ZcpA== X-Gm-Message-State: AOJu0YxYYI9Wv1a0rrIi7V4xs1pI502IUCysg2sTDGS4OrlfFPKDLiVK sUByYQM9Rv/oCrE+gelLdvtbzn8+knwdgLOZvewzgX5NHik0gy2bnHXw10y4ytI4wbplFPJ9fwn ZtwA= X-Gm-Gg: ASbGncudGCw6hlVsCvF3O904fIcjdsi0/ldzMpG7O/vwzLHYylZlBdBfv2zfdTA2WG3 x8sMJV47tVWTTC5YLtxtJhLdOCrEpzUAx6UgqUhpaaMMXxELeKUxDiJV+25el4Tym1NIjmOlduE +ctBtqcWFT4AnVKqKMAoWhm9YO1liKbt2hwVji0CytxFIkDGuNlwGdkIIMcq0rvNZftY2HGUWaU D3QXtorEmUvitIr+LLyFfz+h8WaHRR5+cAd02HMU4mNbbLzeHqM0RX0u9cvbgTgu6Ej4/N+dcvh QfsUsUhalGigI3EX51D5AvaQOOljIdk= X-Google-Smtp-Source: AGHT+IFkqaiAf0xdKKh0b/pmQ7c7zqPgSwzWI6TXIrJoG+6WyJd7yrJkaBjhEO18U0vInVSSBrC4BA== X-Received: by 2002:a05:6000:1889:b0:38b:d807:f3be with SMTP id ffacd0b85a97d-38bec4eecbemr318972f8f.3.1736983419051; Wed, 15 Jan 2025 15:23:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bebd72582sm466070f8f.7.2025.01.15.15.23.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 09/21] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_MIGRATE_EXTRA definition Date: Thu, 16 Jan 2025 00:22:35 +0100 Message-ID: <20250115232247.30364-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 VIRTIO_PCI_FLAG_MIGRATE_EXTRA was only used by the hw_compat_2_4[] array, via the 'migrate-extra=true' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_MIGRATE_EXTRA. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index 971c5fabd44..dd6eb9a4fc7 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -32,7 +32,6 @@ DECLARE_OBJ_CHECKERS(VirtioPCIBusState, VirtioPCIBusClass, enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, - VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, @@ -57,9 +56,6 @@ enum { /* virtio version flags */ #define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT) -/* migrate extra state */ -#define VIRTIO_PCI_FLAG_MIGRATE_EXTRA (1 << VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT) - /* have pio notification for modern device ? */ #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c773a9130c7..8dca3ae73e6 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -144,13 +144,6 @@ static const VMStateDescription vmstate_virtio_pci = { } }; -static bool virtio_pci_has_extra_state(DeviceState *d) -{ - VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); - - return proxy->flags & VIRTIO_PCI_FLAG_MIGRATE_EXTRA; -} - static void virtio_pci_save_extra_state(DeviceState *d, QEMUFile *f) { VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); @@ -2352,8 +2345,6 @@ static void virtio_pci_bus_reset_hold(Object *obj, ResetType type) static const Property virtio_pci_properties[] = { DEFINE_PROP_BIT("virtio-pci-bus-master-bug-migration", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false), - DEFINE_PROP_BIT("migrate-extra", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, true), DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, @@ -2601,7 +2592,6 @@ static void virtio_pci_bus_class_init(ObjectClass *klass, void *data) k->load_queue = virtio_pci_load_queue; k->save_extra_state = virtio_pci_save_extra_state; k->load_extra_state = virtio_pci_load_extra_state; - k->has_extra_state = virtio_pci_has_extra_state; k->query_guest_notifiers = virtio_pci_query_guest_notifiers; k->set_guest_notifiers = virtio_pci_set_guest_notifiers; k->set_host_notifier_mr = virtio_pci_set_host_notifier_mr; From patchwork Wed Jan 15 23:22:36 2025 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: 13941019 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 9D631C02180 for ; Wed, 15 Jan 2025 23:24:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjm-00021T-Ie; Wed, 15 Jan 2025 18:23:50 -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 1tYCjl-0001xw-KY for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:49 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCji-0003tX-JZ for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:49 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4368a293339so2429175e9.3 for ; Wed, 15 Jan 2025 15:23:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983425; x=1737588225; 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=IL9xNknrHx4T5kAU+oIAzW4K0+2aGQMD1Sd2Z6TukXk=; b=VV2eFLcsxYNMMYHRrgfoBsWzvB3qhmfIkU+c+MEpJcw7H0TqsWwfqlVENoYw/b6Ytn iMXLPiFiSjVW+FBtyHP7+3iAeD79XLX7apAu2qSngVrI2He9OQAuR5nPtX3b9wDOBT55 LqijQrqDAl2KISVFH7Lm116XN/VATFcaozLgIQz6aktTEpWZCndv48awjdbrLt0nguHN a/QDGwtKDs1lwpF+ujcLEekz0PtFmNnzq0Vq2whr6fHa6GkZVRusCx9zs1MeoHZY04b2 RUOlIlnRgWO0k/74qrA9tEX5be93K0cfz+1GuqWn0cJ2qhZodHHHXfDlBPbucYAR1nHz yyLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983425; x=1737588225; 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=IL9xNknrHx4T5kAU+oIAzW4K0+2aGQMD1Sd2Z6TukXk=; b=fzucF1/uAnpaaL2FY/53NgFeG6zAwg6OULUyWuKndMhfC++AYgkqClhzpgTuAgEdps GueQs8icgXSVLlsAqsCYHG8PuIu1Pa3hjmDUCSlsV2L6KLAfg6CnldV146lmPyfvpL2J WAI6YMH3td85h5e3Sv4cos6nmd4W0sL/09vammpZwZuft6LSCVqfmtuBaLyMBOa/klFp 2qDOGvzqAt54lz+OBQsxXpKkfBjieRMBg7jZpvFex3nzc1kYt80zVVTzqs61FyDz0978 AeuRkMGhACiiA+eZuO3AM0ZbX+AMwfoDKoTtarT4h2TBcUZO2xNQy+70HuxFPNoKcJwY svXw== X-Gm-Message-State: AOJu0YwS/JraFsVkgjScjK7yRjg2ckH7Ok4h1iyHtWUYfJDLXUBMSkXp xcXxOB7hiGkB8zLutUjCAN5ueAJg79QWyX1dW8AJB4QDTTVdm2zwIuwIeJ6fnOWKZnWBKb2vPVX 7QFU= X-Gm-Gg: ASbGncvU8N+cOlGhv0tr1quIKGpOYwjpfxr4U7MG9G6ys8kkPCC1UfIUwuSJhInAmBp s8caiT+vtulNMSyyEjjkBH+dclx/oduOxMH0ny2Dw+QLuLZIamg1F+yKqe7W6xnAbgM7LNvrO66 IdJjCk7hOYIEWOT7SiEfv4WTGXtBiNnhVeWJ+vyUQgbITpgC73NcP84rtm1obe2Yed7Thrj8awK c0ZzbCGPtYNo7UBrdf68WORCmcoT50zPtcHMDTxh7zwvhFgqSU9sbVdfUNzZF393yuzLbnpR4ul GJeS8oDHyn2CNNjcxBCoL4H0Hlsltt8= X-Google-Smtp-Source: AGHT+IE2ywlAkhr/R8XaktPQ6n3w9t2r/4TYAGxOBfCGV5Yl+nyFSn/8q1sTOU3vIg45CVDJJj2zJQ== X-Received: by 2002:a05:600c:3ca4:b0:436:6460:e680 with SMTP id 5b1f17b1804b1-436e26c3331mr272269895e9.16.1736983424665; Wed, 15 Jan 2025 15:23:44 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e37d012sm18779796f8f.8.2025.01.15.15.23.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 10/21] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_DISABLE_PCIE definition Date: Thu, 16 Jan 2025 00:22:36 +0100 Message-ID: <20250115232247.30364-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org VIRTIO_PCI_FLAG_DISABLE_PCIE was only used by the hw_compat_2_4[] array, via the 'x-disable-pcie=false' property. We removed all machines using that array, lets remove all the code around VIRTIO_PCI_FLAG_DISABLE_PCIE. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-pci.h | 4 ---- hw/virtio/virtio-pci.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index dd6eb9a4fc7..1ca7419cd43 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -33,7 +33,6 @@ enum { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, VIRTIO_PCI_FLAG_ATS_BIT, VIRTIO_PCI_FLAG_INIT_DEVERR_BIT, @@ -53,9 +52,6 @@ enum { * vcpu thread using ioeventfd for some devices. */ #define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT) -/* virtio version flags */ -#define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT) - /* have pio notification for modern device ? */ #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8dca3ae73e6..2f2c6b13863 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2347,8 +2347,6 @@ static const Property virtio_pci_properties[] = { VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false), DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT, false), - DEFINE_PROP_BIT("x-disable-pcie", VirtIOPCIProxy, flags, - VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT, false), DEFINE_PROP_BIT("page-per-vq", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_PAGE_PER_VQ_BIT, false), DEFINE_PROP_BOOL("x-ignore-backend-features", VirtIOPCIProxy, @@ -2377,8 +2375,7 @@ static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp) VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev); PCIDevice *pci_dev = &proxy->pci_dev; - if (!(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) && - virtio_pci_modern(proxy)) { + if (virtio_pci_modern(proxy)) { pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; } From patchwork Wed Jan 15 23:22:37 2025 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: 13941026 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 CC94CC02180 for ; Wed, 15 Jan 2025 23:25:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjt-0002Qw-PI; Wed, 15 Jan 2025 18:23:57 -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 1tYCjr-0002MX-9r for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:55 -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 1tYCjo-0003uo-8I for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:55 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43624b2d453so2186825e9.2 for ; Wed, 15 Jan 2025 15:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983430; x=1737588230; 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=exJ7Ca3R/vq/HHzULuRBCmKkoI6lPeGDRYWa7f2d41s=; b=ltqqemIL8kDimkO2flxzXEWJ3J6J5mbZjly7XajD0dzUPeEBJOArTla3ZqcTA0Hcx+ mexP2xyKhlzMaKKTY1hv6veIv3F3EDwr5yUqWC5v4B8Ncxxl7qcN6fcfFDdYL88WumM/ ct7XWSBj9qutTEEVXwCQJtLEVAOb+GNbOLIfcYu+w9KbJzy11ExtQwlD+f1xpTkSb8AU 2bYQ2WstAArD0QM5bDbuEPxzmCkNjAI2/UOKutDz+JEorkjSh4+BXy+l4XlMgbQX6IDY oZZtEXTpgWmWT+L2g9W+/TBUJUnAgRC7mo2kMQcnn7Znds0Z5O1jTBDjOwbsbAr7xzOg g0zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983430; x=1737588230; 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=exJ7Ca3R/vq/HHzULuRBCmKkoI6lPeGDRYWa7f2d41s=; b=qnPD9Bm87U3uu4q0ZHAVjeyLJflDPmd5X0S8UKK/A0TgrmCKj9/UpSPt0vnqT+kzfx Iehc/41DPl8YWjh/pE4KuYo9wnAtHyPyT8PG7dB4mAr7w++T/gijJQXQGz6Ru5bNcT7k 7xo6pxyvM6VRXMryA5EQL+lh9iwnCx4CBF+qLnWjlO5g/fVfGHSEMnPJ99P+K4SMYIdM PIk9gzasINIY+2VipIsTtArB2PSAd3xxurPYS11E6wgK/PE6qI2zZ9Gh+YId4cK0vxAD rtYaCd1Cb6qNJdz9RNLiwHhW/qLLAWc2+jvV5cl4MFhBXn4Aj6qxrmTV+mgBo1IoqlCH Ri7Q== X-Gm-Message-State: AOJu0YxplnjPt3tbtS2QUSzdhvBiNHL5qzdmFRJjMq4kXE2TJiQ64KNc EWQG3UMKW7vTAHKe57ZtoSzDTejjBUKOvXFWYF9EZ/A/s6L6zQKw0ci/XvdlD5/7jK7fnfi6OaL Fbx0= X-Gm-Gg: ASbGncuE3MxMQVxoVjvPE5MeJfohmA0+z3xcoBvFIoTk+cqkniUOwq6yEwUhY6IwBOV U+2qyBqNn9TpcHyQ7XoPBOUmWPMXgBuUDfgE65jn2Fl07HRQivRcX2kJtIJMDtod2ozIiwoL6MC nee2rNS/mF5ezbmhEUr06AuE0aTB3fAjpg/PJX58apvWCh9XnNPq0sNTVHdAVMPSKSQouG6Y1nJ Inp1sANsM2+drjQwf69QDqKGPLUzk2jmjWzGY7qwLsTqmxXErZemas8eZuzOlg9rczkQew557VW K0t6GdTZrsKAYEEVqdUKSxaePMt6MHQ= X-Google-Smtp-Source: AGHT+IHMK86u6r2/vg6SvATG2OTWt+CQ3fo0OeWwKfkQx2OH3lQkwkFdh1ZvjfCR+7Y3tp7/F1hyYw== X-Received: by 2002:a05:600c:3506:b0:434:f4fa:83c4 with SMTP id 5b1f17b1804b1-436e26f137dmr302758155e9.29.1736983430377; Wed, 15 Jan 2025 15:23:50 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1b44sm19019996f8f.90.2025.01.15.15.23.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 11/21] hw/i386/pc: Remove deprecated pc-q35-2.5 and pc-i440fx-2.5 machines Date: Thu, 16 Jan 2025 00:22:37 +0100 Message-ID: <20250115232247.30364-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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 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 These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") they can now be removed. Remove the now unused empty pc_compat_2_5[] array. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/removed-features.rst | 4 ++-- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 3 --- hw/i386/pc_piix.c | 13 ------------- hw/i386/pc_q35.c | 13 ------------- 5 files changed, 2 insertions(+), 34 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index e4bdb385a25..7b0eaa6ba90 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1012,8 +1012,8 @@ This machine has been renamed ``fuloong2e``. These machine types were very old and likely could not be used for live migration from old QEMU versions anymore. Use a newer machine type instead. -``pc-q35-2.4`` and `pc-i440fx-2.4` (removed in 10.0) -'''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-q35-2.4``, ``pc-q35-2.5``, ``pc-i440fx-2.4`` and ``pc-i440fx-2.5`` (removed in 10.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' This versioned machine has been supported for a period of more than 6 years. Raspberry Pi ``raspi2`` and ``raspi3`` machines (removed in 6.2) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 31e799061ef..02c0cb8bd41 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -295,9 +295,6 @@ extern const size_t pc_compat_2_7_len; extern GlobalProperty pc_compat_2_6[]; extern const size_t pc_compat_2_6_len; -extern GlobalProperty pc_compat_2_5[]; -extern const size_t pc_compat_2_5_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 6d0c9014d63..137f827b69e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -254,9 +254,6 @@ GlobalProperty pc_compat_2_6[] = { }; const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6); -GlobalProperty pc_compat_2_5[] = {}; -const size_t pc_compat_2_5_len = G_N_ELEMENTS(pc_compat_2_5); - /* * @PC_FW_DATA: * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 64c1ab5ff3f..ae573a39836 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -767,19 +767,6 @@ static void pc_i440fx_machine_2_6_options(MachineClass *m) DEFINE_I440FX_MACHINE(2, 6); -static void pc_i440fx_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - - pc_i440fx_machine_2_6_options(m); - x86mc->save_tsc_khz = false; - m->legacy_fw_cfg_order = 1; - compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); - compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); -} - -DEFINE_I440FX_MACHINE(2, 5); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 847f56263f3..ff473b67985 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -661,16 +661,3 @@ static void pc_q35_machine_2_6_options(MachineClass *m) } DEFINE_Q35_MACHINE(2, 6); - -static void pc_q35_machine_2_5_options(MachineClass *m) -{ - X86MachineClass *x86mc = X86_MACHINE_CLASS(m); - - pc_q35_machine_2_6_options(m); - x86mc->save_tsc_khz = false; - m->legacy_fw_cfg_order = 1; - compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len); - compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); -} - -DEFINE_Q35_MACHINE(2, 5); From patchwork Wed Jan 15 23:22:38 2025 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: 13941031 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 51F41C02180 for ; Wed, 15 Jan 2025 23:26:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjw-0002Re-S0; Wed, 15 Jan 2025 18:24:00 -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 1tYCju-0002R8-L3 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:59 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjt-0003vQ-0I for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:58 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385de59c1a0so190541f8f.2 for ; Wed, 15 Jan 2025 15:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983435; x=1737588235; 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=pE1WNLw0lJJVV/NGjFQTr49kafS0H/nFV3VfMQJlIvc=; b=PZn7bMJPl/ABxtXcmsaOp4h4imji9mdfZlPYJS/WgjlPD0d++xiijTxAxujhfOcxzZ 6rb41xLi5xYj/boUKptspsSznjQFCJLZn07YD4CJGAd52/xFBIjCmdi+MMVyvAKBNglV ogtBmYazpcYqI9N1ESyhatga+9YOaEN5iU4v4AOfWlRsVF5ZyNYWrm6NrhqPbeENpcQQ UNG5MCN2eVnZeBASn3asFQEtf40OXoy3GrlNcHU0bRgPwDrtIDzwRfk7aInoXTbB58Ai cZ1RmRX+8Xbj3Rzmt3K3lXM5Z2j7JpjGHH5OD2BKKemDCVPnCqYCYDuNwzF2QIEj9BqQ nqBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983435; x=1737588235; 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=pE1WNLw0lJJVV/NGjFQTr49kafS0H/nFV3VfMQJlIvc=; b=aNEJfmUeyjnNvHM4TJ3aVcdNNSwZSNd3ZV2Hm4h0mzHb382zNQE+A8YP6L74eVduu6 Kw2a9Tho9JyVT91Fp96ZQxWb0yRXB1znG2eATGHC3P2ZhX7OPWaB6CHLukCRiBzfituC K6G8xSybj8cO3/LiSlmWiO0jWrofgMuolf4vxTj+wxbR66XTT/fhv8ATWKhWvOUqEmkn aZA40WUpe3wsJTzfX8e5qABwQLUyXXSo1FOQUsBXDYw56ULFzs4YjGla4wLI37PqFrEk LaTejUf6VPSlM3ftOGSGvgL9+wJFRqc8XceportosrB9JMCDes9gRswnAgpdTkYF+WJM jsgw== X-Gm-Message-State: AOJu0YyE1QyORJGdWArd//mwve1DJZvElqnkmHfclfwjCE5kNVr2EriX OJ/zxsDoulkVWe3x3HG6dUik48+2UQLZbo8EtnqU4sNXn4D/0IAGvC4d/wcgUZQ8q7Uvf182lGR MlsM= X-Gm-Gg: ASbGncsaLho5RmChfnao0ge/TG2MneOVfGr76XmZqhc5r8e5I1g/2uU0JgRcOWdrd3O sO+i/CaIA8/jfbiHt8korHzAiBA5nqpiuXb9Y/zXhNWk5OqhY5T8GtajGcDkS5imiFgHuEHq400 +bxu9+/zSZlN+UOagWqjv9ofaNRqBDsFlpj1iA636OH0FF7HlTCZqghtztZ4tznV0eAq7Iw5iiE OASmCVHSOnIBEOgXdBeJD+vbDhGiMAHGaNRctE//ATrn9qwxDQmcpo406bg6hb1EplAp/wTW9/e nGETaiGFiT7fhDq00VVd3Wrrkofk/Pw= X-Google-Smtp-Source: AGHT+IHAuUG14J19X0M488oc/IPw0mfuW9c9Lp/nrvzWxb26Og7/l/wPyoIeYwLZI54Gv6UtEBEy/w== X-Received: by 2002:a5d:6d89:0:b0:38a:8ace:85e8 with SMTP id ffacd0b85a97d-38a8ace860fmr28733787f8f.44.1736983435361; Wed, 15 Jan 2025 15:23:55 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1c01sm19148272f8f.97.2025.01.15.15.23.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 12/21] hw/i386/x86: Remove X86MachineClass::save_tsc_khz field Date: Thu, 16 Jan 2025 00:22:38 +0100 Message-ID: <20250115232247.30364-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The X86MachineClass::save_tsc_khz boolean was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it and simplify tsc_khz_needed(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/x86.h | 5 ----- hw/i386/x86.c | 1 - target/i386/machine.c | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index d43cb3908e6..29ffa1f450e 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -27,13 +27,8 @@ #include "qom/object.h" struct X86MachineClass { - /*< private >*/ MachineClass parent; - /*< public >*/ - - /* TSC rate migration: */ - bool save_tsc_khz; /* use DMA capable linuxboot option rom */ bool fwcfg_dma_enabled; /* CPU and apic information: */ diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 69bfc00b9a5..57014863936 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -382,7 +382,6 @@ static void x86_machine_class_init(ObjectClass *oc, void *data) mc->get_default_cpu_node_id = x86_get_default_cpu_node_id; mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids; mc->kvm_type = x86_kvm_type; - x86mc->save_tsc_khz = true; x86mc->fwcfg_dma_enabled = true; nc->nmi_monitor_handler = x86_nmi; diff --git a/target/i386/machine.c b/target/i386/machine.c index d9d4f25d1a2..417cb4cd7f9 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -1060,9 +1060,8 @@ static bool tsc_khz_needed(void *opaque) { X86CPU *cpu = opaque; CPUX86State *env = &cpu->env; - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - X86MachineClass *x86mc = X86_MACHINE_CLASS(mc); - return env->tsc_khz && x86mc->save_tsc_khz; + + return env->tsc_khz; } static const VMStateDescription vmstate_tsc_khz = { From patchwork Wed Jan 15 23:22:39 2025 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: 13941022 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 BED1CC02180 for ; Wed, 15 Jan 2025 23:24:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCk2-0002lU-Rx; Wed, 15 Jan 2025 18:24: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 1tYCk0-0002ay-Ms for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:04 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjy-0003wI-5Z for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:04 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-385dece873cso195382f8f.0 for ; Wed, 15 Jan 2025 15:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983440; x=1737588240; 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=uaOAnbKYApd5bKR2JBERa+OaIug2ufoE0uvtXSQimKA=; b=Tf1nxzmBP77flgX0tA50XkUyDjskEqVGiVzgZCmgBGZNb2VRKgnGiNfEnrs7l9olXS X0UZFdPWGiox1ciHsTgbrYEmS/+sAQvG5W4rNXUmXIVkaUjluo9J3/iEuJQEe7jjelHn rOg2LBm0w9EMCaBNiq8jFnbGAlDWmFNyUnufaQg2vCzxeD3OdtBj3NCLpoUvty5ehdxw IfITL+7CpqbWBO2wZ5XsowhX+12wqsIH56HKxheYfQpddDZM4F7s7yCffwyvaeQBrPOT atY/nBQxc5EnE5kYYArPAW5uUxwPgsA6VEVPYCDBHjlyAxKzGnuae+CQ1KCT18rVeFrb 1WhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983440; x=1737588240; 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=uaOAnbKYApd5bKR2JBERa+OaIug2ufoE0uvtXSQimKA=; b=w7y11XIzb26AlSyx9Ge1bs47JSaPw49dyC3H29yiLMd6jMTcoXYGwsOwf6hr+sEEZI t3rTmV2m0NpEbiat4/kh51aBz8hlIzgK7Rco/onLjX7/cMLawxufNctWOXAPklExb/hq MP7fVeOoxUwNduj5/3J8fmHlGDB6MsxDybUC4N5s2eKq9SlOwipk+bBfSwqwFSDXiWXB +2yodXRVIBuv6wzfBMyQNqHa9fBioXYvP57GYPkCB/Cpg6USZFRcsAfSpXbxPSFjxUAa V1cD4MBSFxJthsKJd5wGkDpuVHWFmjGvv3ZPqRdkIBS3eYfYZWegIsq4zD0ZqVSEgyWp pqtw== X-Gm-Message-State: AOJu0Yz7hFTSPUiyvILVUzPgwrbQatC6y5PIkRTkOvPPbQYbOS8p3a6V rZNyA1Dx5Zc2oJ3mJQshqpESljzrMxwRzsSz75zISEL1GkutD3VGz4RTYd03KRt57sFAlamz+Cj ovc8= X-Gm-Gg: ASbGnctLYx+njagLal4T6zDSSUQ3X35S/GwTG5FS2gMdF5YvqnTUQTD/QCg5rFw2iwD TM2EW447ssi0y75GSvKGh7kzt0rR1x2dR/gx6cbfQmgRweMHVQkd2UhbNTd4KFSOe1v4yte/TbQ nPnNNsuzGJxxjMHl+3wmYQPIa2DgUcNdRzCNFgisdIG2SAVjfBs+MJkBk6ynqMNVDFJaa1WDuWv 7TUcLWHwmFyNMyX/1EzTzZQvvkmBL1IdQ4t3QnSBhViRmuFxGUbkyRLeX9eR45K2qETZ4kruV6Z wShgYv8eF32TzB1O2cjvN6OxRKn//N4= X-Google-Smtp-Source: AGHT+IG1p11WYDS0XzrWxuTrxjOmreABfud1dtVr+S+2ng2SRnBPXgR9NimKWFSzsuqguEm6plCA/Q== X-Received: by 2002:a05:6000:709:b0:386:4277:6cf1 with SMTP id ffacd0b85a97d-38a8733a278mr31381929f8f.39.1736983440278; Wed, 15 Jan 2025 15:24:00 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1e0bsm18573205f8f.100.2025.01.15.15.23.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 13/21] hw/nvram/fw_cfg: Remove legacy FW_CFG_ORDER_OVERRIDE Date: Thu, 16 Jan 2025 00:22:39 +0100 Message-ID: <20250115232247.30364-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 The MachineClass::legacy_fw_cfg_order boolean was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it along with: - FW_CFG_ORDER_OVERRIDE_* definitions - fw_cfg_set_order_override() - fw_cfg_reset_order_override() - fw_cfg_order[] - rom_set_order_override() - rom_reset_order_override() Simplify CLI and pc_vga_init() / pc_nic_init(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 3 +- include/hw/loader.h | 2 - include/hw/nvram/fw_cfg.h | 10 ---- hw/core/loader.c | 14 ----- hw/i386/pc.c | 7 +-- hw/nvram/fw_cfg.c | 109 +++----------------------------------- system/vl.c | 5 -- 7 files changed, 9 insertions(+), 141 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index e9e33c57f27..a231c8cecee 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -284,8 +284,7 @@ struct MachineClass { no_floppy:1, no_cdrom:1, no_sdcard:1, - pci_allow_0_address:1, - legacy_fw_cfg_order:1; + pci_allow_0_address:1; bool is_default; const char *default_machine_opts; const char *default_boot_order; diff --git a/include/hw/loader.h b/include/hw/loader.h index 8985046be40..036982db202 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -282,8 +282,6 @@ int rom_add_elf_program(const char *name, GMappedFile *mapped_file, void *data, AddressSpace *as); int rom_check_and_register_reset(void); void rom_set_fw(FWCfgState *f); -void rom_set_order_override(int order); -void rom_reset_order_override(void); /** * rom_transaction_begin: diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index 47578ccc7f2..d41b9328fd1 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -42,14 +42,6 @@ struct FWCfgDataGeneratorClass { typedef struct fw_cfg_file FWCfgFile; -#define FW_CFG_ORDER_OVERRIDE_VGA 70 -#define FW_CFG_ORDER_OVERRIDE_NIC 80 -#define FW_CFG_ORDER_OVERRIDE_USER 100 -#define FW_CFG_ORDER_OVERRIDE_DEVICE 110 - -void fw_cfg_set_order_override(FWCfgState *fw_cfg, int order); -void fw_cfg_reset_order_override(FWCfgState *fw_cfg); - typedef struct FWCfgFiles { uint32_t count; FWCfgFile f[]; @@ -75,8 +67,6 @@ struct FWCfgState { uint32_t cur_offset; Notifier machine_ready; - int fw_cfg_order_override; - bool dma_enabled; dma_addr_t dma_addr; AddressSpace *dma_as; diff --git a/hw/core/loader.c b/hw/core/loader.c index 4dfdb027eee..33523ee9291 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -1352,20 +1352,6 @@ void rom_set_fw(FWCfgState *f) fw_cfg = f; } -void rom_set_order_override(int order) -{ - if (!fw_cfg) - return; - fw_cfg_set_order_override(fw_cfg, order); -} - -void rom_reset_order_override(void) -{ - if (!fw_cfg) - return; - fw_cfg_reset_order_override(fw_cfg); -} - void rom_transaction_begin(void) { Rom *rom; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 137f827b69e..b244cc71ab4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1028,7 +1028,6 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) { DeviceState *dev = NULL; - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_VGA); if (pci_bus) { PCIDevice *pcidev = pci_vga_init(pci_bus); dev = pcidev ? &pcidev->qdev : NULL; @@ -1036,7 +1035,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) ISADevice *isadev = isa_vga_init(isa_bus); dev = isadev ? DEVICE(isadev) : NULL; } - rom_reset_order_override(); + return dev; } @@ -1223,8 +1222,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) bool default_is_ne2k = g_str_equal(mc->default_nic, TYPE_ISA_NE2000); NICInfo *nd; - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_NIC); - while ((nd = qemu_find_nic_info(TYPE_ISA_NE2000, default_is_ne2k, NULL))) { pc_init_ne2k_isa(isa_bus, nd, &error_fatal); } @@ -1233,8 +1230,6 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) if (pci_bus) { pci_init_nic_devices(pci_bus, mc->default_nic); } - - rom_reset_order_override(); } void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index a757939cfb7..48d9e915209 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -817,62 +817,6 @@ void fw_cfg_modify_i64(FWCfgState *s, uint16_t key, uint64_t value) g_free(old); } -void fw_cfg_set_order_override(FWCfgState *s, int order) -{ - assert(s->fw_cfg_order_override == 0); - s->fw_cfg_order_override = order; -} - -void fw_cfg_reset_order_override(FWCfgState *s) -{ - assert(s->fw_cfg_order_override != 0); - s->fw_cfg_order_override = 0; -} - -/* - * This is the legacy order list. For legacy systems, files are in - * the fw_cfg in the order defined below, by the "order" value. Note - * that some entries (VGA ROMs, NIC option ROMS, etc.) go into a - * specific area, but there may be more than one and they occur in the - * order that the user specifies them on the command line. Those are - * handled in a special manner, using the order override above. - * - * For non-legacy, the files are sorted by filename to avoid this kind - * of complexity in the future. - * - * This is only for x86, other arches don't implement versioning so - * they won't set legacy mode. - */ -static struct { - const char *name; - int order; -} fw_cfg_order[] = { - { "etc/boot-menu-wait", 10 }, - { "bootsplash.jpg", 11 }, - { "bootsplash.bmp", 12 }, - { "etc/boot-fail-wait", 15 }, - { "etc/smbios/smbios-tables", 20 }, - { "etc/smbios/smbios-anchor", 30 }, - { "etc/e820", 40 }, - { "etc/reserved-memory-end", 50 }, - { "genroms/kvmvapic.bin", 55 }, - { "genroms/linuxboot.bin", 60 }, - { }, /* VGA ROMs from pc_vga_init come here, 70. */ - { }, /* NIC option ROMs from pc_nic_init come here, 80. */ - { "etc/system-states", 90 }, - { }, /* User ROMs come here, 100. */ - { }, /* Device FW comes here, 110. */ - { "etc/extra-pci-roots", 120 }, - { "etc/acpi/tables", 130 }, - { "etc/table-loader", 140 }, - { "etc/tpm/log", 150 }, - { "etc/acpi/rsdp", 160 }, - { "bootorder", 170 }, - { "etc/msr_feature_control", 180 }, - -#define FW_CFG_ORDER_OVERRIDE_LAST 200 -}; - /* * Any sub-page size update to these table MRs will be lost during migration, * as we use aligned size in ram_load_precopy() -> qemu_ram_resize() path. @@ -890,29 +834,6 @@ static void fw_cfg_acpi_mr_save(FWCfgState *s, const char *filename, size_t len) } } -static int get_fw_cfg_order(FWCfgState *s, const char *name) -{ - int i; - - if (s->fw_cfg_order_override > 0) { - return s->fw_cfg_order_override; - } - - for (i = 0; i < ARRAY_SIZE(fw_cfg_order); i++) { - if (fw_cfg_order[i].name == NULL) { - continue; - } - - if (strcmp(name, fw_cfg_order[i].name) == 0) { - return fw_cfg_order[i].order; - } - } - - /* Stick unknown stuff at the end. */ - warn_report("Unknown firmware file in legacy mode: %s", name); - return FW_CFG_ORDER_OVERRIDE_LAST; -} - void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, FWCfgCallback select_cb, FWCfgWriteCallback write_cb, @@ -921,7 +842,6 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, { int i, index, count; size_t dsize; - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); int order = 0; if (!s->files) { @@ -933,22 +853,10 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, count = be32_to_cpu(s->files->count); assert(count < fw_cfg_file_slots(s)); - /* Find the insertion point. */ - if (mc->legacy_fw_cfg_order) { - /* - * Sort by order. For files with the same order, we keep them - * in the sequence in which they were added. - */ - order = get_fw_cfg_order(s, filename); - for (index = count; - index > 0 && order < s->entry_order[index - 1]; - index--); - } else { - /* Sort by file name. */ - for (index = count; - index > 0 && strcmp(filename, s->files->f[index - 1].name) < 0; - index--); - } + /* Find the insertion point, sorting by file name. */ + for (index = count; + index > 0 && strcmp(filename, s->files->f[index - 1].name) < 0; + index--); /* * Move all the entries from the index point and after down one @@ -1058,7 +966,6 @@ bool fw_cfg_add_file_from_generator(FWCfgState *s, static void fw_cfg_machine_reset(void *opaque) { - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); FWCfgState *s = opaque; void *ptr; size_t len; @@ -1068,11 +975,9 @@ static void fw_cfg_machine_reset(void *opaque) ptr = fw_cfg_modify_file(s, "bootorder", (uint8_t *)buf, len); g_free(ptr); - if (!mc->legacy_fw_cfg_order) { - buf = get_boot_devices_lchs_list(&len); - ptr = fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len); - g_free(ptr); - } + buf = get_boot_devices_lchs_list(&len); + ptr = fw_cfg_modify_file(s, "bios-geometry", (uint8_t *)buf, len); + g_free(ptr); } static void fw_cfg_machine_ready(struct Notifier *n, void *data) diff --git a/system/vl.c b/system/vl.c index be029c52ef8..5bff12ca241 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1197,10 +1197,7 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp) return -1; } } - /* For legacy, keep user files in a specific global order. */ - fw_cfg_set_order_override(fw_cfg, FW_CFG_ORDER_OVERRIDE_USER); fw_cfg_add_file(fw_cfg, name, buf, size); - fw_cfg_reset_order_override(fw_cfg); return 0; } @@ -2672,7 +2669,6 @@ static void qemu_create_cli_devices(void) } /* init generic devices */ - rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE); qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, &error_fatal); QTAILQ_FOREACH(opt, &device_opts, next) { @@ -2683,7 +2679,6 @@ static void qemu_create_cli_devices(void) assert(ret_data == NULL); /* error_fatal aborts */ loc_pop(&opt->loc); } - rom_reset_order_override(); } static bool qemu_machine_creation_done(Error **errp) From patchwork Wed Jan 15 23:22:40 2025 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: 13941024 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 BCF6DC02180 for ; Wed, 15 Jan 2025 23:25:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCk7-00032x-H5; Wed, 15 Jan 2025 18:24:11 -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 1tYCk5-0002vu-6U for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:09 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCk3-0003xD-IF for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:08 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43622267b2eso2380515e9.0 for ; Wed, 15 Jan 2025 15:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983446; x=1737588246; 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=Io7i2xm+U0wVX8KzyUeFMTwhw+WXB6LZvPnnQ4HQaVQ=; b=FfAotW7qMiognxIQRz9XofhycVOiAZeY/N1OSlOtzpSY9L2BCYAxq+5l9WqvfGpfSi H0+8YRxvLqgRPENEbFGYo0atnI3nRJQwPN9EWX2+tZxwdeE8lPB7KyPY4Bmmppl8D2UH tp257yBVOjGwVMticp0tQ8gm8ej+Uvdd/RAgR9Jzk0ZcedAIcmCuFqgIN8s2l8Uswm4S B6i3ZbIWgdk98Jgjj4QWa5oYMjJEfrY/wNlbNfPxQ7JvDvvxrhHNX3yOl6ghMgM+EN5g PGgjxqm1FmesBkEUDV7WS9iC4faQkxGFZ9JEJZw4T0AT5g52+k97HC+XEbChwdNrXrQu uLrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983446; x=1737588246; 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=Io7i2xm+U0wVX8KzyUeFMTwhw+WXB6LZvPnnQ4HQaVQ=; b=WT4dMicLamStNA7ACeTH9KnhOYYt2V5NlNhox0Z0UKhSsAM6A3NlpJJT48jgedLGBG TBf94jUYFTiPvdrMQWkh7DB5TQR/mJVYAsRJWQW1MkOFl4RC5jWN0DDQ8QMsR6VRPwIR fLA8leBpFOanl1U0EQ81WjHNbocaolFelalI9RooqOcoGS0LR21IzhH3WA9Lyx2zNmOO I7ilDih/NRNkmss2zzZnNhKWBS1eQAmgxuWnnCGO7ueS1UjljazajbUW7I0PSFq+XIp/ sCcEVupwkLefsrBAnyTrMpkr9Wr++dQ969R+bAlEc+Q3A/eNvQyGZF35tqEk2xtV/fj+ wBRA== X-Gm-Message-State: AOJu0YyTfFm1Fptfs18xgNzxCItfrmM37kYkX8OcpX2bpyQUptNr2swc 0/GJ/b9aRdBoXh3TPmMOzGP9/jHi4RhYHaducDBIHNqOKPNJ+EwJ1SONtjpbNQK1emSgm7wbif5 zcFM= X-Gm-Gg: ASbGnctItMLEH0x9Qv4DAxOOagZ1bGEeRSWuGIaYo/3VBhZrRlfsTfDzTZ2V1WtLW5d MpBm865RkIr9Bsvy+9XN9Co6AjTuynTyoF8VY0l1ASoNkEJlCX/4KJZjy5EeWPEZjHphg741djr 0EKCj2iRJSGhxMLyDqzxcnIH6JezfHTrAfwQjt5V1aO06vs9h1gFRp1xvU0NGnrJ6iD3uyHbFgD +UFwOHk4Ty3EIYBz+yzEtTocAfr/dl8ClOM9gB9GhcHwGTBMFKD3B6QDLe/w7IaklxgT0lnFtwi plmOsELTOwHT8B0YfNwI/vQqfcV1pcg= X-Google-Smtp-Source: AGHT+IGXqw7aaPV5Y6SY1/DNqGmBR94NsDCI9/mRt6c84z7uK+rOVxVVxX9oanZWjbyJ8ZKdoFbOHA== X-Received: by 2002:a05:600c:4704:b0:436:469f:2210 with SMTP id 5b1f17b1804b1-436e267f796mr230199855e9.1.1736983445904; Wed, 15 Jan 2025 15:24:05 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1c01sm19148545f8f.97.2025.01.15.15.24.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 14/21] hw/core/machine: Remove hw_compat_2_5[] array Date: Thu, 16 Jan 2025 00:22:40 +0100 Message-ID: <20250115232247.30364-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The hw_compat_2_5[] array was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 3 --- hw/core/machine.c | 9 --------- 2 files changed, 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index a231c8cecee..505a7ee85cf 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -837,7 +837,4 @@ extern const size_t hw_compat_2_7_len; extern GlobalProperty hw_compat_2_6[]; extern const size_t hw_compat_2_6_len; -extern GlobalProperty hw_compat_2_5[]; -extern const size_t hw_compat_2_5_len; - #endif diff --git a/hw/core/machine.c b/hw/core/machine.c index bdd4dee3d67..212944c9445 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -272,15 +272,6 @@ GlobalProperty hw_compat_2_6[] = { }; const size_t hw_compat_2_6_len = G_N_ELEMENTS(hw_compat_2_6); -GlobalProperty hw_compat_2_5[] = { - { "isa-fdc", "fallback", "144" }, - { "pvscsi", "x-old-pci-configuration", "on" }, - { "pvscsi", "x-disable-pcie", "on" }, - { "vmxnet3", "x-old-msi-offsets", "on" }, - { "vmxnet3", "x-disable-pcie", "on" }, -}; -const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5); - MachineState *current_machine; static char *machine_get_kernel(Object *obj, Error **errp) From patchwork Wed Jan 15 23:22:41 2025 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: 13941028 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 5DC3EC02183 for ; Wed, 15 Jan 2025 23:25:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkD-0003H9-Ps; Wed, 15 Jan 2025 18:24:17 -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 1tYCkB-0003G8-U3 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:15 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCkA-0003y0-4n for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:15 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3862d161947so171551f8f.3 for ; Wed, 15 Jan 2025 15:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983452; x=1737588252; 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=AdD9bi6uaCwY/ZRVzob+rztBkSJoCnjaJvN09ChGPpM=; b=Lc1cC0hlDQs5NTCY/wUYf8gzqpUdnyu+XtTv83By4FIN8qP+4UyBH0kjkWJfIQUe72 k09QVwUeXYaEgQ4gPaDC7m0JP6FVZMT/kkH0HH7dn8hy+Rr0beURrj7U07fK31BzywBp dehZE5rLtOi10sceTHHppGWKWoWT80ZDb32EfCKFtuCfVSvfBxh9mMvB46hLXSmC6jfY jrEAOHo2fstoZmShnZ2C7zZa+0gUBtsYuNFX29REY0VGWmwNtFQjIK5dFwVfECDGrXYT q31DxCNeuF03NjCPbV1jc1qLwBfUTC89SzLE1SffxFY71KX4GYJ49O9eEQLzURKFtr2J wnGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983452; x=1737588252; 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=AdD9bi6uaCwY/ZRVzob+rztBkSJoCnjaJvN09ChGPpM=; b=mNQ8XySCF+TNSZSRhGO1Qu+B7+LP4Vvyigy98ehyPya4hCLgsEKu3K4NYSwl+Oh71c EXSMmEMKynJ+VwQVPNvEX9nNWIgAZqTWmf2t+Qg2mZvx12Jz48147SPUhLl7ZSlGTJo7 P6rnc/axJ30LfWtSGSUEEJPs5glgMgRjA/5pSV2lAm1/W3Nj4poAnpoI7HnrvlkixZ3m 11rmSh47NwoAXBA7LEJuUF6Rf8HAHl+LuUvwZuxsGGnwRlUazumaj2e9Ouhl0Rhd7oXc aEtCj3Nl0RYLHAiBrheiSEXbuc3PEoTjqUlODmYFU61ByzfOKhmK8tUxxylqJcYrbiAu DgFw== X-Gm-Message-State: AOJu0YxP+yYyZDGXyoZKLbiDQV20HugUeOI2RabvJb2MfsaWNPewJjwZ upCX3vWzsTFCtxDOAjRDMZyjHgPJrUlMOmsOqEbDdF1l0TYVH7W8wewp9SE0ZqOx33UeiFBHom+ w1s4= X-Gm-Gg: ASbGncsl3zj77mcGK4FR+g98aSD2/SHjdBbAKURqyKcAuBBljRrzm3e5KdozYBCS7X2 ZESJalC3ES0eHG+zd/CaZbifC+Xve1esHrbS25WZ0YdNYxWtKr1ORMVCxe8/CwZZMDUJ9RE2Dz5 QbuSX+KR6jcL/cZEMH2evh4q5L8DW9PUuUKw8fW27BJPyajdYgIvdV9r5kyoBwSfA/H68sheklu JS+y/S44nUcnMkyv+vl1n9WLuKXt2aPXZP966gORd9nqduE3tK+dK1S3BFtdav/w8ffEJ6SghZF 9HEO4PHnSjSxH2KszuxdZrgec1VWJWo= X-Google-Smtp-Source: AGHT+IG5ZPcTJ/butZ1Q1KFL4i/I0LtLLg/PQo8EuOK4+jrDnkdhxoim9QJ3Mqyi9C1hmKjZYbuuxg== X-Received: by 2002:a5d:6d8e:0:b0:38a:88be:bcb4 with SMTP id ffacd0b85a97d-38a88bebd23mr26128923f8f.29.1736983452255; Wed, 15 Jan 2025 15:24:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38d008sm19327110f8f.59.2025.01.15.15.24.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 15/21] hw/block/fdc-isa: Remove 'fallback' property Date: Thu, 16 Jan 2025 00:22:41 +0100 Message-ID: <20250115232247.30364-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 The "fallback" property was only used by the hw_compat_2_5[] array, as 'fallback=144'. We removed all machines using that array, lets remove ISA floppy drive 'fallback' property, manually setting the default value in isabus_fdc_realize(). Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc-isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index a10c24aab10..9e99a183c1d 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -112,6 +112,7 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp) } qdev_set_legacy_instance_id(dev, isa->iobase, 2); + qdev_prop_set_enum(dev, "fallback", FLOPPY_DRIVE_TYPE_288); fdctrl_realize_common(dev, fdctrl, &err); if (err != NULL) { @@ -293,9 +294,6 @@ static const Property isa_fdc_properties[] = { DEFINE_PROP_SIGNED("fdtypeB", FDCtrlISABus, state.qdev_for_drives[1].type, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), - DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback, - FLOPPY_DRIVE_TYPE_288, qdev_prop_fdc_drive_type, - FloppyDriveType), }; static void isabus_fdc_class_init(ObjectClass *klass, void *data) From patchwork Wed Jan 15 23:22:42 2025 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: 13941029 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 79D0DC02180 for ; Wed, 15 Jan 2025 23:25:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkI-0003Wd-Ci; Wed, 15 Jan 2025 18:24: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 1tYCkG-0003Ol-Lb for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:20 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCkF-0003z9-58 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:20 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso1548885e9.0 for ; Wed, 15 Jan 2025 15:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983457; x=1737588257; 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=O4yl4DQEqVaBZntvaEzVkn8po7qkjcpxFpZJUic/H/4=; b=rqavEPYNO+nqMq/FiF6VBHsrI6YwS816ytLj9UXOmBJsBxO4h054w3M1QBfUB386Mq p6lncKQaS0FQgsXg7Op5m1MIvTM7Z4DCRwv9fJhR3hskjtdBf4r8Uk0x0RBu6hlT+5Ic nOOQqIIF3OzW++poExnr/seGO3OdnXAZCdbst+P0FUCmALrcFW75uYSL07umAyYO1mnp 8K5VQ/JRTpyOkFDWM7KkuQ9xkIJ5dRkX9Wo7YprGZhbyDXK2o9EUt5t+SLpnp4OTyNxd ks+JIUsDjvL/ciWRVQIUjcZ/oA9mp+kVZzm6WjbMG3+9L7kcVL3A8cItF2Ag96ka2lPV FgGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983457; x=1737588257; 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=O4yl4DQEqVaBZntvaEzVkn8po7qkjcpxFpZJUic/H/4=; b=Z8y133xACzvCAJnRHznzf4mswPzFblsDdskEGdxfO0p+ZKQGpf9QVGeIRbnRLTAAS2 Y5QqO9cUuKLSZL7VdNjxxOABFUvfsUsc2N8w8RYPdL/XlsetseO7ne8AdeEREj+6DUs2 hY1Y8svBcPZFdz0hKO5YL+ubadnVUpnNTCKt1ZPQwViOwaqmzss+U/O3V5FnoWuPb/Ew bOMlv588rqNdzCmBuq2bdN8WSriQmARyyRuvGBejPrSC4h5YcGY+TjbDmjghSgrIuJIv H/uKpDQA4JKMNOHg6Azl7s1jMYfNnwOyU65hNc+hzwcH6MF0ev46J1GwmmPfAaIujcVs 5xlg== X-Gm-Message-State: AOJu0YwEFnuLSxGnDQitvfS/iw4iF1IyvIaqwzRbFPdp4g/dZHr0Fzsv xo8AlnnTwwdk2m3Z1YjU8ZL8H3+k0KJuRVy/YBwbeR+SThH4e8DrHgdHFC/r4hFyhsFlHFE3g1W 0e7k= X-Gm-Gg: ASbGncvvFDAl287hpssF0NtFYvriAKInKonyoDfB40XFt9zE6aKO7PWtuXsdTqa8Cr5 orinOnsRmRs8jUJZslJvCgGfS5CQvdcwIiNJSvmJJsNVZjhXdODLN/xiiD2GhHkl1kbzUAnspo6 wnxo+CpTslxIKIx5MrWKeBRPglAS3WvTwg/TGmhZ8jgDLYE+vMd0ZzQ/UPkmNBhADeesrbJjeul dl8lnBMQPoJiV8a6zYZ1E1Mzn9BdCONnXKSM8UFyi8QqKgeJdCbKtCu3kO3POf4N/hnuPRB6EBZ PhbohFgI4mu6G3KtfpSc9RXw2TSLWgk= X-Google-Smtp-Source: AGHT+IEplKswGuBIKj9shlQAig/os2HBaSPBitSudUYZnXJb2uyhAqGryrnXEAd5AGce/HTsQL/I1g== X-Received: by 2002:a05:600c:5117:b0:431:60ec:7a96 with SMTP id 5b1f17b1804b1-436e26ddc53mr238742545e9.25.1736983457161; Wed, 15 Jan 2025 15:24:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b8124sm18585770f8f.81.2025.01.15.15.24.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 16/21] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_OLD_PCI_CONFIGURATION definition Date: Thu, 16 Jan 2025 00:22:42 +0100 Message-ID: <20250115232247.30364-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org PVSCSI_COMPAT_OLD_PCI_CONFIGURATION was only used by the hw_compat_2_5[] array, via the 'x-old-pci-configuration=on' property. We removed all machines using that array, lets remove all the code around PVSCSI_COMPAT_OLD_PCI_CONFIGURATION. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/vmw_pvscsi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index f07e377cb88..8c793b4188d 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -69,17 +69,11 @@ OBJECT_DECLARE_TYPE(PVSCSIState, PVSCSIClass, PVSCSI) /* Compatibility flags for migration */ -#define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT 0 -#define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION \ - (1 << PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT) #define PVSCSI_COMPAT_DISABLE_PCIE_BIT 1 #define PVSCSI_COMPAT_DISABLE_PCIE \ (1 << PVSCSI_COMPAT_DISABLE_PCIE_BIT) -#define PVSCSI_USE_OLD_PCI_CONFIGURATION(s) \ - ((s)->compat_flags & PVSCSI_COMPAT_OLD_PCI_CONFIGURATION) -#define PVSCSI_MSI_OFFSET(s) \ - (PVSCSI_USE_OLD_PCI_CONFIGURATION(s) ? 0x50 : 0x7c) +#define PVSCSI_MSI_OFFSET (0x7c) #define PVSCSI_EXP_EP_OFFSET (0x40) typedef struct PVSCSIRingInfo { @@ -1110,7 +1104,7 @@ pvscsi_init_msi(PVSCSIState *s) int res; PCIDevice *d = PCI_DEVICE(s); - res = msi_init(d, PVSCSI_MSI_OFFSET(s), PVSCSI_MSIX_NUM_VECTORS, + res = msi_init(d, PVSCSI_MSI_OFFSET, PVSCSI_MSIX_NUM_VECTORS, PVSCSI_USE_64BIT, PVSCSI_PER_VECTOR_MASK, NULL); if (res < 0) { trace_pvscsi_init_msi_fail(res); @@ -1298,8 +1292,6 @@ static const VMStateDescription vmstate_pvscsi = { static const Property pvscsi_properties[] = { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), - DEFINE_PROP_BIT("x-old-pci-configuration", PVSCSIState, compat_flags, - PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), }; From patchwork Wed Jan 15 23:22:43 2025 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: 13941033 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 CAAF9C02185 for ; Wed, 15 Jan 2025 23:26:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkQ-000460-OK; Wed, 15 Jan 2025 18:24: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 1tYCkO-0003wQ-9r for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:28 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCkK-0003zn-Po for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:28 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38a8b35e168so233867f8f.1 for ; Wed, 15 Jan 2025 15:24:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983463; x=1737588263; 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=E+EUM/dGaTmpBqRyvcVhqEGwu4Bbc6dUevtMJGPZQoI=; b=tg8Xj0Qsmtfti74oI+XOnrBLJTAXGknRRwtWfewBKMHaeoWi4gZETuzUEGkx2m5tAS GCvSauQdVAzkZXjUS+sqAmV8LUR5421KQtN2mt3eWklpTija7DgSZvhkjaVrLIfnpRXR JukvNsEpQlTX/tD/xzXshZiW/mbfgT258tC5MFPu94z1RVQkY/WWW4q+B6aFXnxEd1S+ jr39JkXCQerywCHAdPZFLJvUwVXcb9+wWRGa+zems3k61/LcGQZIjOt53qszdy++tOBW LeijegRLrkqlAgl56OliEzHdbkeAFETwPGeQhQLfAgjH9izQ291APDJWoSFBEdKZxZb9 OSpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983463; x=1737588263; 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=E+EUM/dGaTmpBqRyvcVhqEGwu4Bbc6dUevtMJGPZQoI=; b=wWyewSE+EKlw3k6nv+RFsT/5yS/X8k4muEncxLk2XPPfFlApFZwi2Eqhy4kOdwIbP2 0IIZ1GYgpwwER3X24u5G+22ksf7hTm4Chzfjw80eCI20OKvoukfs1DhOAq617g14H8tz VGoqbGhcQHDCesZ4Hjx2HMpAmABA5goq1+/f6gc6vsTCZerGnhXMBXGt6kat1a8835q/ Ep04jfXyHNBI3Ji8fA0bH/bfpjkpaKfDcaG2KA0O1UN79G4p0gXykufLThfKu53HwL7x q3tETrH0schcxm3mM1yykKsVZOvzTfhmQmi+rHP6C/Gyu9Nr3ybv1PL8QF8xnzGGOSNK bh8A== X-Gm-Message-State: AOJu0Yw/WEBn7ZJWT/5mmXtMUROYr/VrDj6kUTr6t8oKr+quzw0regdD 0vslc0vDg3D+8LtXmwCUCDYLL4A2Qb2nHpjhJA2FKCm4O/zg0XTC2bJ8IbkGMZUcupQa4ewJykq +9+E= X-Gm-Gg: ASbGnctH4ypAgLp16b3i9N2CzQhvzr2xkZVd0FLRDErUyLRbiZpSqbPDoGkRUyd3QO6 /SQYoO9tiVpqBjpfn9WVGNjguQBABETvo28QY0WoFKM34LB25bM5lthyfAeZ21eJu95ehQSaJYV EBeo38eVRZ9Z+ZP3d/A3bwfrZTfK70umro0JW7lRvhB/ETf7+Zr0IIBiz+OfIQSSw+0uquQuT6G +mWVWpa9MFORG8cEGrkrLIzpajMMjrAYU903JeLOs1jrNcTKN28OlaruVwd/UEXJ17DY3u4FWeA P7Innii4WDkaasRgIIfguYF+Lk5W1P0= X-Google-Smtp-Source: AGHT+IHXtT+t92dBv7aDszdTResZLPnWtvBmArCTjujgUpNgaR1Nls1qjM1O8hUbJZMM5WxHoxhkiA== X-Received: by 2002:a5d:6482:0:b0:38a:87cd:6d67 with SMTP id ffacd0b85a97d-38bec3b45b2mr464731f8f.0.1736983462834; Wed, 15 Jan 2025 15:24:22 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74e59fasm39329265e9.34.2025.01.15.15.24.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 17/21] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_DISABLE_PCIE_BIT definition Date: Thu, 16 Jan 2025 00:22:43 +0100 Message-ID: <20250115232247.30364-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 PVSCSI_COMPAT_DISABLE_PCIE_BIT was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=on' property. We removed all machines using that array, lets remove all the code around PVSCSI_COMPAT_DISABLE_PCIE_BIT. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/vmw_pvscsi.c | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 8c793b4188d..4c95794ba1e 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -68,11 +68,6 @@ struct PVSCSIClass { OBJECT_DECLARE_TYPE(PVSCSIState, PVSCSIClass, PVSCSI) -/* Compatibility flags for migration */ -#define PVSCSI_COMPAT_DISABLE_PCIE_BIT 1 -#define PVSCSI_COMPAT_DISABLE_PCIE \ - (1 << PVSCSI_COMPAT_DISABLE_PCIE_BIT) - #define PVSCSI_MSI_OFFSET (0x7c) #define PVSCSI_EXP_EP_OFFSET (0x40) @@ -1152,15 +1147,11 @@ pvscsi_realizefn(PCIDevice *pci_dev, Error **errp) trace_pvscsi_state("init"); /* PCI subsystem ID, subsystem vendor ID, revision */ - if (PVSCSI_USE_OLD_PCI_CONFIGURATION(s)) { - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, 0x1000); - } else { - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID, - PCI_VENDOR_ID_VMWARE); - pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, - PCI_DEVICE_ID_VMWARE_PVSCSI); - pci_config_set_revision(pci_dev->config, 0x2); - } + pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID, + PCI_VENDOR_ID_VMWARE); + pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID, + PCI_DEVICE_ID_VMWARE_PVSCSI); + pci_config_set_revision(pci_dev->config, 0x2); /* PCI latency timer = 255 */ pci_dev->config[PCI_LATENCY_TIMER] = 0xff; @@ -1228,21 +1219,8 @@ pvscsi_post_load(void *opaque, int version_id) return 0; } -static bool pvscsi_vmstate_need_pcie_device(void *opaque) -{ - PVSCSIState *s = PVSCSI(opaque); - - return !(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE); -} - -static bool pvscsi_vmstate_test_pci_device(void *opaque, int version_id) -{ - return !pvscsi_vmstate_need_pcie_device(opaque); -} - static const VMStateDescription vmstate_pvscsi_pcie_device = { .name = "pvscsi/pcie", - .needed = pvscsi_vmstate_need_pcie_device, .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState), VMSTATE_END_OF_LIST() @@ -1256,9 +1234,8 @@ static const VMStateDescription vmstate_pvscsi = { .pre_save = pvscsi_pre_save, .post_load = pvscsi_post_load, .fields = (const VMStateField[]) { - VMSTATE_STRUCT_TEST(parent_obj, PVSCSIState, - pvscsi_vmstate_test_pci_device, 0, - vmstate_pci_device, PCIDevice), + VMSTATE_STRUCT(parent_obj, PVSCSIState, 0, + vmstate_pci_device, PCIDevice), VMSTATE_UINT8(msi_used, PVSCSIState), VMSTATE_UINT32(resetting, PVSCSIState), VMSTATE_UINT64(reg_interrupt_status, PVSCSIState), @@ -1292,19 +1269,14 @@ static const VMStateDescription vmstate_pvscsi = { static const Property pvscsi_properties[] = { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), - DEFINE_PROP_BIT("x-disable-pcie", PVSCSIState, compat_flags, - PVSCSI_COMPAT_DISABLE_PCIE_BIT, false), }; static void pvscsi_realize(DeviceState *qdev, Error **errp) { PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev); PCIDevice *pci_dev = PCI_DEVICE(qdev); - PVSCSIState *s = PVSCSI(qdev); - if (!(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE)) { - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; pvs_c->parent_dc_realize(qdev, errp); } From patchwork Wed Jan 15 23:22:44 2025 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: 13941036 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 C3CF7C02183 for ; Wed, 15 Jan 2025 23:26:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkU-0004Nq-8s; Wed, 15 Jan 2025 18:24:34 -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 1tYCkS-0004DR-EA for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:32 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCkQ-00040V-GK for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:32 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4363dc916ceso8979265e9.0 for ; Wed, 15 Jan 2025 15:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983468; x=1737588268; 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=ZxdK0rL3TGvxKN2I0NmHhWUdtlccPSUCy16k5xwbSmw=; b=mAnPDmv+qc3YX1bMnyJcQI1sATBFawOJxGBR/4oJV49t7NoThggTbNsalisDzc7NlP cT7IZYHb5lZHIkbUNlTwz8GIBtqXiIBymxi6CdwfJWLzQB/hw5A5Dk1z0CcTd2P8u5L3 9mNApMxJoe+4MNmjNYb9vdcsNYrK/JdZ0Q5ES2RFBOZWVEESVevnW+GCbKdeuz26B1Uc JekEYG1/jLYwuOTV+ZyA0zNaZAf+wEgSqgeFL+/QNTTQZIgfvDEGx5PKOfDkq7eLo9EV Yk+K6e6hrXdZmn6Narg0TgSJ0PpjdgvrVvcvBjWrsHkf+oKOm4ofhrbQIAc0gL2IDmE6 qgaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983468; x=1737588268; 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=ZxdK0rL3TGvxKN2I0NmHhWUdtlccPSUCy16k5xwbSmw=; b=eICLM43q1cIorTWthOXj6DzQPpMTbS0VdO7/HAMcDOsqtOxYYHe0JhIlQHrIc4ujbq FC8TOZU2fk8Um0yEb+AIOPz69K6A9sg4GqTeGkDS8aBoZ3QLiGj830WH5ltvW4ID8JM+ bxAstpXKQ28BWoF9e2h6zLCSRB0hm3jVt/2P8Pw7oR1bMU3gi7t7UQ81W7Wh6CByMMJ4 EIf6IzWGb8e57MhyZ3CUsY3MXBG+lyK4QqTiZ79mMeNCXCMP8cdiJTQFNRxyup4cmQpZ ARRwHjmIXjw1p6p0p5ZIsB5D9NLy4UkRBLQFKOIKdqQ/a9UAXoauWzLxhjHqBUZlaWXy 3+qg== X-Gm-Message-State: AOJu0YxD8hk93e0pecogXgiNb93/g7O0vrvtQE2tSr1L7ue4YU1UKiyI WvZzNvHzT7m5uKGb9//lcRC4v6eDttmC/uh3j3mLxRyp+kDnXSPzYCcEJCA1PzO4SmC4Mc4JDMb 6lWc= X-Gm-Gg: ASbGncudDYGPc1PuAqWB0ZnWAQv/uxOqBB9UfoMM8micU9kAuCNcssFx1PbH3lWKI7t zZcU0BmQwBV6Tq2N1LUj4biC3JUriLeG4FPD9GYTHvU2K1adlLW7S99d5qQtTw0yy34JOFl/wop K5mUCg4VVmpQD78v22K5KC2XB5xpoQU2oMxm8vJ60kR00dEJ/1RRn7ZfS7gOCUaMsYkBNblS7/1 FmVl2rd0zeeTT9QrE6668PaUKB75kpw3m/3sXDtpNGRP+Mt5V5TijamfynniMxgn+QHm6Ll8bgx OCPf5EXQWKHkcTMsGA508ZXtm7bvo1o= X-Google-Smtp-Source: AGHT+IF3GqutWvG3Ir3IQx+pJ+/afAGEXy+rbywm4hF++tNe2cEAfDlJArsRGRgEwu2Cnj6jfyTyfw== X-Received: by 2002:a05:6000:4007:b0:386:37f8:450b with SMTP id ffacd0b85a97d-38bec4f5d09mr346740f8f.5.1736983468479; Wed, 15 Jan 2025 15:24:28 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e37d154sm19264317f8f.10.2025.01.15.15.24.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 18/21] hw/scsi/vmw_pvscsi: Convert DeviceRealize -> InstanceInit Date: Thu, 16 Jan 2025 00:22:44 +0100 Message-ID: <20250115232247.30364-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Simplify replacing pvscsi_realize() by pvscsi_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/vmw_pvscsi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 4c95794ba1e..02b4b41f4a5 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1271,21 +1271,15 @@ static const Property pvscsi_properties[] = { DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1), }; -static void pvscsi_realize(DeviceState *qdev, Error **errp) +static void pvscsi_instance_init(Object *obj) { - PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev); - PCIDevice *pci_dev = PCI_DEVICE(qdev); - - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - - pvs_c->parent_dc_realize(qdev, errp); + PCI_DEVICE(obj)->cap_present |= QEMU_PCI_CAP_EXPRESS; } static void pvscsi_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - PVSCSIClass *pvs_k = PVSCSI_CLASS(klass); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass); k->realize = pvscsi_realizefn; @@ -1294,8 +1288,6 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) k->device_id = PCI_DEVICE_ID_VMWARE_PVSCSI; k->class_id = PCI_CLASS_STORAGE_SCSI; k->subsystem_id = 0x1000; - device_class_set_parent_realize(dc, pvscsi_realize, - &pvs_k->parent_dc_realize); device_class_set_legacy_reset(dc, pvscsi_reset); dc->vmsd = &vmstate_pvscsi; device_class_set_props(dc, pvscsi_properties); @@ -1310,6 +1302,7 @@ static const TypeInfo pvscsi_info = { .class_size = sizeof(PVSCSIClass), .instance_size = sizeof(PVSCSIState), .class_init = pvscsi_class_init, + .instance_init = pvscsi_instance_init, .interfaces = (InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, { INTERFACE_PCIE_DEVICE }, From patchwork Wed Jan 15 23:22:45 2025 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: 13941030 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 322B9C02180 for ; Wed, 15 Jan 2025 23:25:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkp-0004pc-Iv; Wed, 15 Jan 2025 18:24:57 -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 1tYCkX-0004fL-44 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:37 -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 1tYCkV-00041b-Aj for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:36 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361f796586so2175025e9.3 for ; Wed, 15 Jan 2025 15:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983473; x=1737588273; 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=L6gCnpU/Y2GXgiWgcA00csT8poFSxQKI6kWtg9WbUPU=; b=VyKEaqAO5+yrqNd/ChEPmXyiA6POXJRvTv6GLkyCrSzhlAp19u8Mc0BpcFvjquWcre OpnaZ4Ro0PchTsiuwFzt2IKJConQBzhDAqNH+xXfVDaxpOVv9qWY0IcHKs7Bz0yiuQJf W0xlQJE8Kh5XPMXtjVQpjKsvHM9PJzZQftENZU7O9jLCDp6Jhswf8F0W1zyBG7ckkPdt Zy2XjW1gxKGuzqrp2U2BPB9nI6SUbigoiojaz+VrDZa6hLk4n/QFKP85tUAc4+rDcR0L DJiCc4ubO4ekvcgqvLIsBO4kO06MgDC321NIkReov3nENLVZl9sV3l9NNzWRXxiOiLPD EYFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983473; x=1737588273; 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=L6gCnpU/Y2GXgiWgcA00csT8poFSxQKI6kWtg9WbUPU=; b=bk+Av/JTlc2JheMn2CQNstVKEjAMnHvT2eYpdjmsWbcf/JrmSJx+8PaLcahGvZESuy 7WiTecgyYxJkCU3HkKlqKdgP+iFl7Kwx62/2ue1XEl4z/+pWMT2mWCqB4h/QgBy3dBzF dj8fFEVYjGDG2wmHt/89y1PeX9xb/kspIbEiMkzuyUXUWSGZgjpub76HfC/8bs1L4eks 44AfD8+y8FQATdCP6iwiG2Iy9O4lnRJ/lG8QOg9zcJes+vEj5d3nkRwGf2XLmJayJGox 3GVkO6S2YikawkU61TWyiv0sV2znfyV3f1OofsdNAO25XnC7A+HPX1e7oKd6FNG+1g3z EU4g== X-Gm-Message-State: AOJu0YxZckhFgZH/EuizF5AFyL+OTUVYlUKRoX+98VHbIG0zSXuxK5T0 g1UACLNNyYjOITe6ycOZ0wXd6Y7/yYtkDQLFQqPoSU43sZkWtwmfI9VZMRml77jF6Sl8WoB8jhR 2rv0= X-Gm-Gg: ASbGncu75roznS1NUk+PgDv7EAZ6bkvtHgdtoxk0/uG0FshkQxaTZuG6aQR7bfRRIxz oZaU+FAOAmzzFNkWIm5f/bOeB3yXLYl4RNCFGACsdMJCNsKrcEyRPrghBuvGJMeY3PR1myGLTr4 PY/il4kHbFMTJw2eaVCbHz/D4BwvniYprQAcse9gNpVVoQz/y5xqQ1m9Edmwvmry8UuIoJ1URDr xYaZJhFvd4hhyiUmwBr5dV1kHJHaD7buI5MRhIPuPlnc4v6D2CXunhEXpZ6uVPzPwGwaaJORJbM 4bd43zBS/ObtfKmvKiDV9NA751+Du8g= X-Google-Smtp-Source: AGHT+IHj3acvcSkeilY24aLkNF+xUq1J6OMmZLhHQRhAMjWTdkVXm/kSsLb70NUg4uFDaOuTeMu9eg== X-Received: by 2002:a05:600c:1c1a:b0:434:a802:e9a6 with SMTP id 5b1f17b1804b1-436e2679a94mr310444315e9.7.1736983473309; Wed, 15 Jan 2025 15:24:33 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c753c60csm38180825e9.36.2025.01.15.15.24.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 19/21] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS definition Date: Thu, 16 Jan 2025 00:22:45 +0100 Message-ID: <20250115232247.30364-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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 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 VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS was only used by the hw_compat_2_5[] array, via the 'x-old-msi-offsets=on' property. We removed all machines using that array, lets remove all the code around VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/vmxnet3.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 7abed664690..a527042ab32 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -42,18 +42,13 @@ #define VMXNET3_MSIX_BAR_SIZE 0x2000 /* Compatibility flags for migration */ -#define VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT 0 -#define VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS \ - (1 << VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT) #define VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT 1 #define VMXNET3_COMPAT_FLAG_DISABLE_PCIE \ (1 << VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT) #define VMXNET3_EXP_EP_OFFSET (0x48) -#define VMXNET3_MSI_OFFSET(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x50 : 0x84) -#define VMXNET3_MSIX_OFFSET(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0 : 0x9c) +#define VMXNET3_MSI_OFFSET (0x84) +#define VMXNET3_MSIX_OFFSET (0x9c) #define VMXNET3_DSN_OFFSET (0x100) #define VMXNET3_BAR0_IDX (0) @@ -61,8 +56,7 @@ #define VMXNET3_MSIX_BAR_IDX (2) #define VMXNET3_OFF_MSIX_TABLE (0x000) -#define VMXNET3_OFF_MSIX_PBA(s) \ - ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x800 : 0x1000) +#define VMXNET3_OFF_MSIX_PBA (0x1000) /* Link speed in Mbps should be shifted by 16 */ #define VMXNET3_LINK_SPEED (1000 << 16) @@ -2123,8 +2117,8 @@ vmxnet3_init_msix(VMXNET3State *s) &s->msix_bar, VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE, &s->msix_bar, - VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s), - VMXNET3_MSIX_OFFSET(s), NULL); + VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA, + VMXNET3_MSIX_OFFSET, NULL); if (0 > res) { VMW_WRPRN("Failed to initialize MSI-X, error %d", res); @@ -2222,7 +2216,7 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp) /* Interrupt pin A */ pci_dev->config[PCI_INTERRUPT_PIN] = 0x01; - ret = msi_init(pci_dev, VMXNET3_MSI_OFFSET(s), VMXNET3_MAX_NMSIX_INTRS, + ret = msi_init(pci_dev, VMXNET3_MSI_OFFSET, VMXNET3_MAX_NMSIX_INTRS, VMXNET3_USE_64BIT, VMXNET3_PER_VECTOR_MASK, NULL); /* Any error other than -ENOTSUP(board's MSI support is broken) * is a programming error. Fall back to INTx silently on -ENOTSUP */ @@ -2473,8 +2467,6 @@ static const VMStateDescription vmstate_vmxnet3 = { static const Property vmxnet3_properties[] = { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), - DEFINE_PROP_BIT("x-old-msi-offsets", VMXNET3State, compat_flags, - VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false), DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), }; From patchwork Wed Jan 15 23:22:46 2025 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: 13941035 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 EE6C2C02180 for ; Wed, 15 Jan 2025 23:26:38 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCl0-0005oL-Uy; Wed, 15 Jan 2025 18:25:07 -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 1tYCkd-0004pp-Ol for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:50 -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 1tYCkb-000439-Jj for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:43 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-385d7b4da2bso314371f8f.1 for ; Wed, 15 Jan 2025 15:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983480; x=1737588280; 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=aKoFnQ5SYagANUInklr1BkIfWF4VImHQnYuMR45zsrk=; b=lS3q8DGEA0xb9cJ3hY/laWP1UwbfEWv+mU+dN53LHwvgB3tb/5mENVEUEAfxMVgPXw 482zzLC1xgkFmLVWhsaljpEbZVWVjDht0QROW0qD+g1dj2wQHc8vLdeZnmOE7inGuN/s +IOy+jBjPbOjmHFnIL1nlVx09a6YgvNGlXK58gTn100sgZV/qDl5lKh0D4qQzzMXAi/l pxbzX1syytW+N8vTX4kPcIIPogmVXDHeo/jejYJseEkFGMAZUcQn+Q3wcyoH2zs/3iTp 6heIicYUx5z0H7E6bNSO71hyls82aWoA7Aqx1d5d+oLsStIg/oIFp8o/zvKz1SBaVoAZ Rw3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983480; x=1737588280; 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=aKoFnQ5SYagANUInklr1BkIfWF4VImHQnYuMR45zsrk=; b=NIy6iAzcACsi3QxBK/AoaTA+VgBTcaaP7bHXBrPfCcAPJLFNbXN0etJr7G5s2Kj0Fh KKi0OAfntjysBLsqIHdXZKg97fAu0Ah2Q64orCdXryyTIK0tHUZp8MKDBVIyrkdBHTb/ 65+pv4Qd7vlsn5TX6C9g7XwyBsWQyXW9k508sf6b5ZUNWK3DWtSi9MuWxnI2vpog8+Eb oVCQEQD39naotyZEdWv2pQbRlI4Rw3XgRtGdyDoHxriTJCfK6H+JTObLuh7/vi3Q+rMk BM80LHpwAu0+XAlCR6ISgK+HkQxOQMw43m/lvxCDr1SkyIfVF/y5sVKJyNytf9tCo5S9 sTxg== X-Gm-Message-State: AOJu0YxRaCFUp8yAmjwPtWo/inxDZhotF+yaclncXcfZ6jvAnDaAMzFo klfbVMN4+fQDTXKqZ8mqOlj9xPa8mcJq64toy/u/OFchUhPymJNXlaTv/KEgWszWf/msByOiKtr +AxA= X-Gm-Gg: ASbGncuqGaez2W3OCl6MasXsmwBKcggj1a04mQolg97YWgblp5D460KY4UcMQgWeYQZ nAKCShl4u9THHTL9ocNlm6kCspZv9z6tsreBzV3qRWXkdqZridZTXGzyhJ/AFy3sVCH0H75L5fI ZYMNJ8rHO+qB0Fpq/X0GfrSXnKD2nMHMSGHnJ59SyKz7yJ6IKbbXHpH0C7f3uHzwFXDtL3TlGC4 OK87VtvNYwTL4SuQAQrSb4qzW6SmpIZJL2YD8N5qLaxb3x9D18WFIqjyGxmV3dv6uYXJnq9Jp+x Gvmp60DFjJ0CRHxObLOTZ2GrWRlq87c= X-Google-Smtp-Source: AGHT+IFPUzDdZaQzj4hnqyTFcfmgZfa3lry5GOEq6rqqrqnCzhKrmzNmaqFKCHW/M8dbKOhUzx0Zxg== X-Received: by 2002:a5d:6da2:0:b0:382:3959:f429 with SMTP id ffacd0b85a97d-38a872fbcdcmr175620f8f.5.1736983479636; Wed, 15 Jan 2025 15:24:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e37d012sm18781309f8f.8.2025.01.15.15.24.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 20/21] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_DISABLE_PCIE definition Date: Thu, 16 Jan 2025 00:22:46 +0100 Message-ID: <20250115232247.30364-21-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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 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 VMXNET3_COMPAT_FLAG_DISABLE_PCIE was only used by the hw_compat_2_5[] array, via the 'x-disable-pcie=on' property. We removed all machines using that array, lets remove all the code around VMXNET3_COMPAT_FLAG_DISABLE_PCIE. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/vmxnet3.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index a527042ab32..d8132773fad 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -41,11 +41,6 @@ #define PCI_DEVICE_ID_VMWARE_VMXNET3_REVISION 0x1 #define VMXNET3_MSIX_BAR_SIZE 0x2000 -/* Compatibility flags for migration */ -#define VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT 1 -#define VMXNET3_COMPAT_FLAG_DISABLE_PCIE \ - (1 << VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT) - #define VMXNET3_EXP_EP_OFFSET (0x48) #define VMXNET3_MSI_OFFSET (0x84) #define VMXNET3_MSIX_OFFSET (0x9c) @@ -2467,8 +2462,6 @@ static const VMStateDescription vmstate_vmxnet3 = { static const Property vmxnet3_properties[] = { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), - DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags, - VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false), }; static void vmxnet3_realize(DeviceState *qdev, Error **errp) @@ -2477,9 +2470,7 @@ static void vmxnet3_realize(DeviceState *qdev, Error **errp) PCIDevice *pci_dev = PCI_DEVICE(qdev); VMXNET3State *s = VMXNET3(qdev); - if (!(s->compat_flags & VMXNET3_COMPAT_FLAG_DISABLE_PCIE)) { - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - } + pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; vc->parent_dc_realize(qdev, errp); } From patchwork Wed Jan 15 23:22:47 2025 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: 13941027 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 1CC37C02183 for ; Wed, 15 Jan 2025 23:25:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCkv-0005Gh-3v; Wed, 15 Jan 2025 18:25:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYCki-0004uM-SO for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:54 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCkg-00044M-Jh for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:24:48 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43618283dedso2225635e9.3 for ; Wed, 15 Jan 2025 15:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983484; x=1737588284; 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=3MeEeWLQLu5S/9pne2OBNrXJxMiShf4rM4A4caNKWSo=; b=IgzQDk5//arKXdZPMm2eHpgzcswuNLqGFgGmMOKQYQH0pu9zuLJ9QSZqjnAhf27nz+ DA9WrsRhWCL/yjg9LWSzAQbjeNRcj1NWzH4f0Enb/OBOOb6k5gUyVJPEPpyJgVIHgdC4 /0mJjJRzxt5jpkQvp2YMiUyDCZKEdJ88zUCfK4F7YSct/RpO8U4FNR5WLy8ogVbn19yD vrlzapHzBWsxoxX2yeQcerMwCKqc03UE/xSCkkcBpqO5GpjqoUlb46xfRCufY5Hx+2Zp PIiCbPcJ3K5+BYpmQk9hiN561ytrIiqfbo2Ea4tutQCE4zZIQeM9Q3YtP+UJkNH9K6Au mC3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983484; x=1737588284; 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=3MeEeWLQLu5S/9pne2OBNrXJxMiShf4rM4A4caNKWSo=; b=O2En8MpPLvu6mjBuZ1l6GSTXHVsspzrqCbQVGPHdw9LfDRrmLSru6tZTxmdDa9gCaY MVhfyCVIwCrn+iiYdUcsqs+3EfPZX7kHpcDYuCkC9dz0L31AgCz1DVSjRwYsqZeK6iIM 9uw58Ze5T98YCDdjVGaUhnJWtibpTt35fK3F+s2ywH1X18oCb/HSyPWq/A3A+pB5pg49 +rKd88POvQnsyck6X9yQvlDUEwuXi+6DBlID+bjUmkFPvzFcCJPee7Wt4tKkLv5vs+pL /XLVSw7wEwLlK2IRBVlK7rlKZl0CAf9bNbNQydApXb9pHLUEKLQXELzwUzuCM6/XuSpt Y/2Q== X-Gm-Message-State: AOJu0Yxs8ZEnybr6N3ALXUR5k68LbQskJa+oCiiBUpHXCTkzj2NGaJVO wfQQDwfASMilaL5rolDFrKYtE+J3bynq8oZbJqEiuI7WkfiBeiwcu5fhC8vr48hTLDzZp4Own2N 8a4o= X-Gm-Gg: ASbGnctw8ayKZUeFze/fxCcvYZNu7EMB7NVVaMZBOskrF6ne3dl1rb2UIl45LjCRy3N iim/L3WJoecDPnygcWx3BhHuDv2ejM1/fQnVJcTgyhwtm/alrebbWJRTHYDPUymlRJ4e5zrNqas WHisWRB2BDzQauYiiYHymc8f+AACT5UQmPT9AYXxtHvsS9heeOkVDuZgivBPcIOLsj3968EFMGJ bjGzYTCd89QwnbeF+FmBJHsED+6U/Oj8cUsB1IRfnMC4uOusfQTvs/JpsZNr+jKa7TJ3PyySwHj 6MJjrZUfmPb7MPVB2dg5gNAaEdBdg+8= X-Google-Smtp-Source: AGHT+IG49VpBEobbS4qDW+iM5udPv1ILB1wWrjPlSRbXrH+NDQcb/Ax56VwAEp+bwh6Q1kcnh+hepA== X-Received: by 2002:a05:600c:348c:b0:435:14d:f61a with SMTP id 5b1f17b1804b1-436e2707c4emr241072415e9.25.1736983484554; Wed, 15 Jan 2025 15:24:44 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74ac604sm38605875e9.13.2025.01.15.15.24.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:24:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 21/21] hw/net/vmxnet3: Merge DeviceRealize in InstanceInit Date: Thu, 16 Jan 2025 00:22:47 +0100 Message-ID: <20250115232247.30364-22-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Simplify merging vmxnet3_realize() within vmxnet3_instance_init(), removing the need for device_class_set_parent_realize(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/vmxnet3.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index d8132773fad..2757fd83505 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2239,6 +2239,7 @@ static void vmxnet3_instance_init(Object *obj) device_add_bootindex_property(obj, &s->conf.bootindex, "bootindex", "/ethernet-phy@0", DEVICE(obj)); + PCI_DEVICE(obj)->cap_present |= QEMU_PCI_CAP_EXPRESS; } static void vmxnet3_pci_uninit(PCIDevice *pci_dev) @@ -2464,22 +2465,10 @@ static const Property vmxnet3_properties[] = { DEFINE_NIC_PROPERTIES(VMXNET3State, conf), }; -static void vmxnet3_realize(DeviceState *qdev, Error **errp) -{ - VMXNET3Class *vc = VMXNET3_DEVICE_GET_CLASS(qdev); - PCIDevice *pci_dev = PCI_DEVICE(qdev); - VMXNET3State *s = VMXNET3(qdev); - - pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; - - vc->parent_dc_realize(qdev, errp); -} - static void vmxnet3_class_init(ObjectClass *class, void *data) { DeviceClass *dc = DEVICE_CLASS(class); PCIDeviceClass *c = PCI_DEVICE_CLASS(class); - VMXNET3Class *vc = VMXNET3_DEVICE_CLASS(class); c->realize = vmxnet3_pci_realize; c->exit = vmxnet3_pci_uninit; @@ -2490,8 +2479,6 @@ static void vmxnet3_class_init(ObjectClass *class, void *data) c->class_id = PCI_CLASS_NETWORK_ETHERNET; c->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE; c->subsystem_id = PCI_DEVICE_ID_VMWARE_VMXNET3; - device_class_set_parent_realize(dc, vmxnet3_realize, - &vc->parent_dc_realize); dc->desc = "VMWare Paravirtualized Ethernet v3"; device_class_set_legacy_reset(dc, vmxnet3_qdev_reset); dc->vmsd = &vmstate_vmxnet3;