[PULL 22/28] hw/i386/pc: Remove pc_compat_2_12[] array

Thomas Huth posted 28 patches 1 month, 1 week ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Yi Liu <yi.l.liu@intel.com>, "Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
[PULL 22/28] hw/i386/pc: Remove pc_compat_2_12[] array
Posted by Thomas Huth 1 month, 1 week ago
From: Philippe Mathieu-Daudé <philmd@linaro.org>

The pc_compat_2_12[] array was only used by the pc-q35-2.12
and pc-i440fx-2.12 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-9-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/i386/pc.h | 3 ---
 hw/i386/pc.c         | 8 --------
 2 files changed, 11 deletions(-)

diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index a3b270ccc97..113813c07d7 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -280,9 +280,6 @@ extern const size_t pc_compat_3_1_len;
 extern GlobalProperty pc_compat_3_0[];
 extern const size_t pc_compat_3_0_len;
 
-extern GlobalProperty pc_compat_2_12[];
-extern const size_t pc_compat_2_12_len;
-
 #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
     static void pc_machine_##suffix##_class_init(ObjectClass *oc, \
                                                  const void *data) \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 6427c62dbcd..819e729a6e3 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -221,14 +221,6 @@ GlobalProperty pc_compat_3_0[] = {
 };
 const size_t pc_compat_3_0_len = G_N_ELEMENTS(pc_compat_3_0);
 
-GlobalProperty pc_compat_2_12[] = {
-    { TYPE_X86_CPU, "legacy-cache", "on" },
-    { TYPE_X86_CPU, "topoext", "off" },
-    { "EPYC-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
-    { "EPYC-IBPB-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
-};
-const size_t pc_compat_2_12_len = G_N_ELEMENTS(pc_compat_2_12);
-
 /*
  * @PC_FW_DATA:
  * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
-- 
2.53.0


Re: [PULL 22/28] hw/i386/pc: Remove pc_compat_2_12[] array
Posted by Zhao Liu 1 month ago
> -GlobalProperty pc_compat_2_12[] = {
> -    { TYPE_X86_CPU, "legacy-cache", "on" },

It seems "legacy-cache" property could be deprecated later.

> -    { TYPE_X86_CPU, "topoext", "off" },
> -    { "EPYC-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
> -    { "EPYC-IBPB-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
> -};
> -const size_t pc_compat_2_12_len = G_N_ELEMENTS(pc_compat_2_12);

Thanks,
Zhao
Re: [PULL 22/28] hw/i386/pc: Remove pc_compat_2_12[] array
Posted by Philippe Mathieu-Daudé 1 month ago
Hi,

On 10/3/26 11:10, Zhao Liu wrote:
>> -GlobalProperty pc_compat_2_12[] = {
>> -    { TYPE_X86_CPU, "legacy-cache", "on" },
> 
> It seems "legacy-cache" property could be deprecated later.

FTR I focus on machines and don't have enough X86 knowledge to
understand the scope of each X86 CPU properties, I rather let
these specific deprecation cleanups for developers more familiar
with the X86 architecture.

>> -    { TYPE_X86_CPU, "topoext", "off" },
>> -    { "EPYC-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
>> -    { "EPYC-IBPB-" TYPE_X86_CPU, "xlevel", "0x8000000a" },
>> -};
>> -const size_t pc_compat_2_12_len = G_N_ELEMENTS(pc_compat_2_12);
> 
> Thanks,
> Zhao
>