[PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array

Philippe Mathieu-Daudé posted 16 patches 6 months, 2 weeks ago
There is a newer version of this series
[PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array
Posted by Philippe Mathieu-Daudé 6 months, 2 weeks ago
The pc_compat_2_6[] array was only used by the pc-q35-2.6
and pc-i440fx-2.6 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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 a3de3e9560d..4fb2033bc54 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -292,9 +292,6 @@ extern const size_t pc_compat_2_8_len;
 extern GlobalProperty pc_compat_2_7[];
 extern const size_t pc_compat_2_7_len;
 
-extern GlobalProperty pc_compat_2_6[];
-extern const size_t pc_compat_2_6_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 49632b69d29..7573b880905 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -251,14 +251,6 @@ GlobalProperty pc_compat_2_7[] = {
 };
 const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7);
 
-GlobalProperty pc_compat_2_6[] = {
-    { TYPE_X86_CPU, "cpuid-0xb", "off" },
-    { "vmxnet3", "romfile", "" },
-    { TYPE_X86_CPU, "fill-mtrr-mask", "off" },
-    { "apic-common", "legacy-instance-id", "on", }
-};
-const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6);
-
 /*
  * @PC_FW_DATA:
  * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
-- 
2.47.1


Re: [PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array
Posted by Thomas Huth 6 months, 2 weeks ago
On 01/05/2025 20.36, Philippe Mathieu-Daudé wrote:
> The pc_compat_2_6[] array was only used by the pc-q35-2.6
> and pc-i440fx-2.6 machines, which got removed. Remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   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 a3de3e9560d..4fb2033bc54 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -292,9 +292,6 @@ extern const size_t pc_compat_2_8_len;
>   extern GlobalProperty pc_compat_2_7[];
>   extern const size_t pc_compat_2_7_len;
>   
> -extern GlobalProperty pc_compat_2_6[];
> -extern const size_t pc_compat_2_6_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 49632b69d29..7573b880905 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -251,14 +251,6 @@ GlobalProperty pc_compat_2_7[] = {
>   };
>   const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7);
>   
> -GlobalProperty pc_compat_2_6[] = {
> -    { TYPE_X86_CPU, "cpuid-0xb", "off" },
> -    { "vmxnet3", "romfile", "" },
> -    { TYPE_X86_CPU, "fill-mtrr-mask", "off" },
> -    { "apic-common", "legacy-instance-id", "on", }
> -};

So you took care of apic-common in the next patch, but what about 
fill-mtrr-mask and cpuid-0xb ? I think these could be cleaned up, too?

  Thomas


Re: [PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array
Posted by Philippe Mathieu-Daudé 6 months, 2 weeks ago
On 5/5/25 11:19, Thomas Huth wrote:
> On 01/05/2025 20.36, Philippe Mathieu-Daudé wrote:
>> The pc_compat_2_6[] array was only used by the pc-q35-2.6
>> and pc-i440fx-2.6 machines, which got removed. Remove it.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   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 a3de3e9560d..4fb2033bc54 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -292,9 +292,6 @@ extern const size_t pc_compat_2_8_len;
>>   extern GlobalProperty pc_compat_2_7[];
>>   extern const size_t pc_compat_2_7_len;
>> -extern GlobalProperty pc_compat_2_6[];
>> -extern const size_t pc_compat_2_6_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 49632b69d29..7573b880905 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -251,14 +251,6 @@ GlobalProperty pc_compat_2_7[] = {
>>   };
>>   const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7);
>> -GlobalProperty pc_compat_2_6[] = {
>> -    { TYPE_X86_CPU, "cpuid-0xb", "off" },
>> -    { "vmxnet3", "romfile", "" },
>> -    { TYPE_X86_CPU, "fill-mtrr-mask", "off" },
>> -    { "apic-common", "legacy-instance-id", "on", }
>> -};
> 
> So you took care of apic-common in the next patch, but what about fill- 
> mtrr-mask and cpuid-0xb ? I think these could be cleaned up, too?

I'm not sure about CPU features, I'll defer the corresponding cleanups
to someone more familiar with the architecture and its real world uses.


Re: [PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array
Posted by Thomas Huth 6 months, 2 weeks ago
On 01/05/2025 20.36, Philippe Mathieu-Daudé wrote:
> The pc_compat_2_6[] array was only used by the pc-q35-2.6
> and pc-i440fx-2.6 machines, which got removed. Remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/hw/i386/pc.h | 3 ---
>   hw/i386/pc.c         | 8 --------
>   2 files changed, 11 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH v2 04/16] hw/i386/pc: Remove pc_compat_2_6[] array
Posted by Mark Cave-Ayland 6 months, 2 weeks ago
On 01/05/2025 19:36, Philippe Mathieu-Daudé wrote:

> The pc_compat_2_6[] array was only used by the pc-q35-2.6
> and pc-i440fx-2.6 machines, which got removed. Remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   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 a3de3e9560d..4fb2033bc54 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -292,9 +292,6 @@ extern const size_t pc_compat_2_8_len;
>   extern GlobalProperty pc_compat_2_7[];
>   extern const size_t pc_compat_2_7_len;
>   
> -extern GlobalProperty pc_compat_2_6[];
> -extern const size_t pc_compat_2_6_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 49632b69d29..7573b880905 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -251,14 +251,6 @@ GlobalProperty pc_compat_2_7[] = {
>   };
>   const size_t pc_compat_2_7_len = G_N_ELEMENTS(pc_compat_2_7);
>   
> -GlobalProperty pc_compat_2_6[] = {
> -    { TYPE_X86_CPU, "cpuid-0xb", "off" },
> -    { "vmxnet3", "romfile", "" },
> -    { TYPE_X86_CPU, "fill-mtrr-mask", "off" },
> -    { "apic-common", "legacy-instance-id", "on", }
> -};
> -const size_t pc_compat_2_6_len = G_N_ELEMENTS(pc_compat_2_6);
> -
>   /*
>    * @PC_FW_DATA:
>    * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


ATB,

Mark.