Skip to contentSkip to conversation

hw/i386/pc: Remove deprecated 3.0 machines

PATCH Applied Philippe Mathieu-Daudé 4 participants 15 messages Mar 7 – Mar 9 KVM

lore
Share & tools
lore
#0 lore raw

cover hw/i386/pc: Remove deprecated 3.0 machines

1 y.o. dust Thomas asked me to post:

The versioned 'pc' and 'q35' machines up to 3.0 been marked as deprecated two releases ago, and are older than 6 years, so according to our support policy we can remove them.

Philippe Mathieu-Daudé (4):
hw/i386/pc: Remove deprecated pc-q35-3.0 and pc-i440fx-3.0 machines hw/i386/pc: Remove pc_compat_3_0[] array target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field hw/core/machine: Remove the hw_compat_3_0[] array

 include/hw/core/boards.h |  3 ---
 include/hw/i386/pc.h     |  3 ---
 target/i386/cpu.h        |  1 -
 hw/core/machine.c        |  3 ---
 hw/i386/pc.c             |  7 -------
 hw/i386/pc_piix.c        |  9 ---------
 hw/i386/pc_q35.c         |  9 ---------
 target/i386/cpu.c        |  2 --
 target/i386/kvm/kvm.c    | 15 ++++-----------
 9 files changed, 4 insertions(+), 48 deletions(-)
Signature · 1 line
2.52.0
#1 lore raw

PATCH 1/4 hw/i386/pc: Remove deprecated pc-q35-3.0 and pc-i440fx-3.0 machines

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.

---
 hw/i386/pc_piix.c | 9 ---------
 hw/i386/pc_q35.c  | 9 ---------
 2 files changed, 18 deletions(-)
hw/i386/pc_piix.c +0 -9
index 961432176cf..29c8e997131 100644
@@ -668,15 +668,6 @@ static void pc_i440fx_machine_3_1_options(MachineClass *m)
 
 DEFINE_I440FX_MACHINE(3, 1);
 
-static void pc_i440fx_machine_3_0_options(MachineClass *m)
-{
-    pc_i440fx_machine_3_1_options(m);
-    compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len);
-    compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
-}
-
-DEFINE_I440FX_MACHINE(3, 0);
-
 #ifdef CONFIG_XEN
 static void xenfv_machine_4_2_options(MachineClass *m)
 {
hw/i386/pc_q35.c +0 -9
index 261d759a223..f102da8e4a1 100644
@@ -614,12 +614,3 @@ static void pc_q35_machine_3_1_options(MachineClass *m)
 }
 
 DEFINE_Q35_MACHINE(3, 1);
-
-static void pc_q35_machine_3_0_options(MachineClass *m)
-{
-    pc_q35_machine_3_1_options(m);
-    compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len);
-    compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
-}
-
-DEFINE_Q35_MACHINE(3, 0);
Signature · 1 line
2.52.0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] hw/i386/pc: Remove deprecated pc-q35-3.0 and pc-i440fx-3.0 machines

Quoted 38 lines · Philippe Mathieu-Daudé

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.

---
  hw/i386/pc_piix.c | 9 ---------
  hw/i386/pc_q35.c  | 9 ---------
  2 files changed, 18 deletions(-)
hw/i386/pc_piix.c +0 -9
index 961432176cf..29c8e997131 100644
@@ -668,15 +668,6 @@ static void pc_i440fx_machine_3_1_options(MachineClass *m)
 
  DEFINE_I440FX_MACHINE(3, 1);
 
-static void pc_i440fx_machine_3_0_options(MachineClass *m)
-{
-    pc_i440fx_machine_3_1_options(m);
-    compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len);
-    compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
-}
-
-DEFINE_I440FX_MACHINE(3, 0);
-
  #ifdef CONFIG_XEN
  static void xenfv_machine_4_2_options(MachineClass *m)
  {
hw/i386/pc_q35.c +0 -0
index 261d759a223..f102da8e4a1 100644
@@ -614,12 +614,3 @@ static void pc_q35_machine_3_1_options(MachineClass *m)
  }
 

hw/i386/pc_q35.c static void pc_q35_machine_3_1_options(MachineClass *m) · line 625

Quoted 10 lines
hw/i386/pc_q35.c +0 -9
  DEFINE_Q35_MACHINE(3, 1);
-
-static void pc_q35_machine_3_0_options(MachineClass *m)
-{
-    pc_q35_machine_3_1_options(m);
-    compat_props_add(m->compat_props, hw_compat_3_0, hw_compat_3_0_len);
-    compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len);
-}
-
-DEFINE_Q35_MACHINE(3, 0);
Reviewed-by on v1 1/4
#3 lore raw

Re: [PATCH 1/4] hw/i386/pc: Remove deprecated pc-q35-3.0 and pc-i440fx-3.0 machines

In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

Date: Sat, 7 Mar 2026 16:00:39 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH 1/4] hw/i386/pc: Remove deprecated pc-q35-3.0 and
pc-i440fx-3.0 machines
X-Mailer: git-send-email 2.52.0

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.

Quoted 5 lines
---
 hw/i386/pc_piix.c | 9 ---------
 hw/i386/pc_q35.c  | 9 ---------
 2 files changed, 18 deletions(-)
#4 lore raw

PATCH 2/4 hw/i386/pc: Remove pc_compat_3_0[] array

In reply to Philippe Mathieu-Daudé

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

---
 include/hw/i386/pc.h | 3 ---
 hw/i386/pc.c         | 7 -------
 2 files changed, 10 deletions(-)
include/hw/i386/pc.h +0 -3
index 113813c07d7..5623660f5dd 100644
@@ -277,9 +277,6 @@ extern const size_t pc_compat_4_0_len;
 extern GlobalProperty pc_compat_3_1[];
 extern const size_t pc_compat_3_1_len;
 
-extern GlobalProperty pc_compat_3_0[];
-extern const size_t pc_compat_3_0_len;
-
 #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
     static void pc_machine_##suffix##_class_init(ObjectClass *oc, \
                                                  const void *data) \
hw/i386/pc.c +0 -7
index 819e729a6e3..a38634e3577 100644
@@ -214,13 +214,6 @@ GlobalProperty pc_compat_3_1[] = {
 };
 const size_t pc_compat_3_1_len = G_N_ELEMENTS(pc_compat_3_1);
 
-GlobalProperty pc_compat_3_0[] = {
-    { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" },
-    { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" },
-    { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" },
-};
-const size_t pc_compat_3_0_len = G_N_ELEMENTS(pc_compat_3_0);
-
 /*
  * @PC_FW_DATA:
  * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
Signature · 1 line
2.52.0
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] hw/i386/pc: Remove pc_compat_3_0[] array

Quoted 31 lines · Philippe Mathieu-Daudé

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

---
  include/hw/i386/pc.h | 3 ---
  hw/i386/pc.c         | 7 -------
  2 files changed, 10 deletions(-)
include/hw/i386/pc.h +0 -3
index 113813c07d7..5623660f5dd 100644
@@ -277,9 +277,6 @@ extern const size_t pc_compat_4_0_len;
  extern GlobalProperty pc_compat_3_1[];
  extern const size_t pc_compat_3_1_len;
 
-extern GlobalProperty pc_compat_3_0[];
-extern const size_t pc_compat_3_0_len;
-
  #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
      static void pc_machine_##suffix##_class_init(ObjectClass *oc, \
                                                   const void *data) \
hw/i386/pc.c +0 -0
index 819e729a6e3..a38634e3577 100644
@@ -214,13 +214,6 @@ GlobalProperty pc_compat_3_1[] = {
  };
  const size_t pc_compat_3_1_len = G_N_ELEMENTS(pc_compat_3_1);
 

hw/i386/pc.c GlobalProperty pc_compat_3_1[] = { · line 219

Quoted 10 lines
hw/i386/pc.c +0 -7
-GlobalProperty pc_compat_3_0[] = {
-    { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" },
-    { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" },
-    { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" },
-};
-const size_t pc_compat_3_0_len = G_N_ELEMENTS(pc_compat_3_0);
-
  /*
   * @PC_FW_DATA:
   * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables
#6 lore raw

Re: [PATCH 2/4] hw/i386/pc: Remove pc_compat_3_0[] array

- Philippe propuso eliminar la matriz pc_compat_3_0[] del código i386/pc.
- Thomas Huth revisó y aprobó el parche propuesto por Philippe.

[email protected]

Quoted 48 lines · Thomas Huth
Quoted 31 lines · Philippe Mathieu-Daudé

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

---
  include/hw/i386/pc.h | 3 ---
  hw/i386/pc.c         | 7 -------
  2 files changed, 10 deletions(-)
include/hw/i386/pc.h +0 -3
index 113813c07d7..5623660f5dd 100644
@@ -277,9 +277,6 @@ extern const size_t pc_compat_4_0_len;
  extern GlobalProperty pc_compat_3_1[];
  extern const size_t pc_compat_3_1_len;
 
-extern GlobalProperty pc_compat_3_0[];
-extern const size_t pc_compat_3_0_len;
-
  #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
      static void pc_machine_##suffix##_class_init(ObjectClass *oc, \
                                                   const void *data) \
hw/i386/pc.c +0 -0
index 819e729a6e3..a38634e3577 100644
@@ -214,13 +214,6 @@ GlobalProperty pc_compat_3_1[] = {
  };
  const size_t pc_compat_3_1_len = G_N_ELEMENTS(pc_compat_3_1);
 

hw/i386/pc.c GlobalProperty pc_compat_3_1[] = { · line 219

Quoted 10 lines
hw/i386/pc.c +0 -7
-GlobalProperty pc_compat_3_0[] = {
-    { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" },
-    { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" },
-    { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" },
-};
-const size_t pc_compat_3_0_len = G_N_ELEMENTS(pc_compat_3_0);
-
  /*
   * @PC_FW_DATA:
   * Size of the chunk of memory at the top of RAM for the BIOS ACPI

tables

Reviewed-by on v1 2/4
#7 lore raw

Re: [PATCH 2/4] hw/i386/pc: Remove pc_compat_3_0[] array

In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

Date: Sat, 7 Mar 2026 16:00:40 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH 2/4] hw/i386/pc: Remove pc_compat_3_0[] array
X-Mailer: git-send-email 2.52.0

Quoted 8 lines

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

---
 include/hw/i386/pc.h | 3 ---
 hw/i386/pc.c         | 7 -------
 2 files changed, 10 deletions(-)
#8 lore raw

PATCH 3/4 target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field

In reply to Philippe Mathieu-Daudé

The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09 "hyperv: only add SynIC in compatible configurations") was only set in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on' property. We removed all machines using that array, lets remove that property and all the code around it.

---
 target/i386/cpu.h     |  1 -
 target/i386/cpu.c     |  2 --
 target/i386/kvm/kvm.c | 15 ++++-----------
 3 files changed, 4 insertions(+), 14 deletions(-)
target/i386/cpu.h +0 -1
index f2679cc5b72..2b70d56e9b0 100644
@@ -2335,7 +2335,6 @@ struct ArchCPU {
 
     uint32_t hyperv_spinlock_attempts;
     char *hyperv_vendor;
-    bool hyperv_synic_kvm_only;
     uint64_t hyperv_features;
     bool hyperv_passthrough;
     OnOffAuto hyperv_no_nonarch_cs;
target/i386/cpu.c +0 -2
index 01b64940b17..c77addd2c25 100644
@@ -10589,8 +10589,6 @@ static const Property x86_cpu_properties[] = {
      * to the specific Windows version being used."
      */
     DEFINE_PROP_INT32("x-hv-max-vps", X86CPU, hv_max_vps, -1),
-    DEFINE_PROP_BOOL("x-hv-synic-kvm-only", X86CPU, hyperv_synic_kvm_only,
-                     false),
     DEFINE_PROP_BOOL("x-intel-pt-auto-level", X86CPU, intel_pt_auto_level,
                      true),
     DEFINE_PROP_BOOL("x-l1-cache-per-thread", X86CPU, l1_cache_per_core, true),
target/i386/kvm/kvm.c +4 -11
index 27b1b848d6a..a29f757c168 100644
@@ -1278,10 +1278,7 @@ static struct kvm_cpuid2 *get_supported_hv_cpuid_legacy(CPUState *cs)
     }
 
     if (has_msr_hv_synic) {
-        unsigned int cap = cpu->hyperv_synic_kvm_only ?
-            KVM_CAP_HYPERV_SYNIC : KVM_CAP_HYPERV_SYNIC2;
-
-        if (kvm_check_extension(cs->kvm_state, cap) > 0) {
+        if (kvm_check_extension(cs->kvm_state, KVM_CAP_HYPERV_SYNIC2) > 0) {
             entry_feat->eax |= HV_SYNIC_AVAILABLE;
         }
     }
@@ -1543,7 +1540,6 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp)
 
     /* Additional dependencies not covered by kvm_hyperv_properties[] */
     if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) &&
-        !cpu->hyperv_synic_kvm_only &&
         !hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX)) {
         error_setg(errp, "Hyper-V %s requires Hyper-V %s",
                    kvm_hyperv_properties[HYPERV_FEAT_SYNIC].desc,
@@ -1608,8 +1604,7 @@ static int hyperv_fill_cpuids(CPUState *cs,
     c->eax |= HV_HYPERCALL_AVAILABLE;
 
     /* SynIC and Vmbus devices require messages/signals hypercalls */
-    if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC) &&
-        !cpu->hyperv_synic_kvm_only) {
+    if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
         c->ebx |= HV_POST_MESSAGES | HV_SIGNAL_EVENTS;
     }
 
@@ -1752,16 +1747,14 @@ static int hyperv_init_vcpu(X86CPU *cpu)
     }
 
     if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
-        uint32_t synic_cap = cpu->hyperv_synic_kvm_only ?
-            KVM_CAP_HYPERV_SYNIC : KVM_CAP_HYPERV_SYNIC2;
-        ret = kvm_vcpu_enable_cap(cs, synic_cap, 0);
+        ret = kvm_vcpu_enable_cap(cs, KVM_CAP_HYPERV_SYNIC2, 0);
         if (ret < 0) {
             error_report("failed to turn on HyperV SynIC in KVM: %s",
                          strerror(-ret));
             return ret;
         }
 
-        if (!cpu->hyperv_synic_kvm_only && !hyperv_is_synic_enabled()) {
+        if (!hyperv_is_synic_enabled()) {
             ret = hyperv_x86_synic_add(cpu);
             if (ret < 0) {
                 error_report("failed to create HyperV SynIC: %s",
Signature · 1 line
2.52.0
Reviewed-by on v1 3/4
#9 lore raw

Re: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field

Quoted 6 lines · Philippe Mathieu-Daudé

The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09 "hyperv: only add SynIC in compatible configurations") was only set in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on' property. We removed all machines using that array, lets remove that property and all the code around it.

Quoted 6 lines
---
  target/i386/cpu.h     |  1 -
  target/i386/cpu.c     |  2 --
  target/i386/kvm/kvm.c | 15 ++++-----------
  3 files changed, 4 insertions(+), 14 deletions(-)
Reviewed-by on v1 3/4
#10 lore raw

Re: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field

In reply to Philippe Mathieu-Daudé
Quoted 12 lines · Philippe Mathieu-Daudé

Date: Sat, 7 Mar 2026 16:00:41 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH 3/4] target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only
field
X-Mailer: git-send-email 2.52.0

The X86CPU::hyperv_synic_kvm_only boolean (see commit 9b4cf107b09 "hyperv: only add SynIC in compatible configurations") was only set in the pc_compat_3_0[] array, via the 'x-hv-synic-kvm-only=on' property. We removed all machines using that array, lets remove that property and all the code around it.

Quoted 6 lines
---
 target/i386/cpu.h     |  1 -
 target/i386/cpu.c     |  2 --
 target/i386/kvm/kvm.c | 15 ++++-----------
 3 files changed, 4 insertions(+), 14 deletions(-)
#11 lore raw

PATCH 4/4 hw/core/machine: Remove the hw_compat_3_0[] array

In reply to Philippe Mathieu-Daudé

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

---
 include/hw/core/boards.h | 3 ---
 hw/core/machine.c        | 3 ---
 2 files changed, 6 deletions(-)
include/hw/core/boards.h +0 -3
index f4ee68bbea5..9ad2a7d5c97 100644
@@ -871,7 +871,4 @@ extern const size_t hw_compat_4_0_len;
 extern GlobalProperty hw_compat_3_1[];
 extern const size_t hw_compat_3_1_len;
 
-extern GlobalProperty hw_compat_3_0[];
-extern const size_t hw_compat_3_0_len;
-
 #endif
hw/core/machine.c +0 -3
index 4770618b559..162600425b0 100644
@@ -238,9 +238,6 @@ GlobalProperty hw_compat_3_1[] = {
 };
 const size_t hw_compat_3_1_len = G_N_ELEMENTS(hw_compat_3_1);
 
-GlobalProperty hw_compat_3_0[] = {};
-const size_t hw_compat_3_0_len = G_N_ELEMENTS(hw_compat_3_0);
-
 MachineState *current_machine;
 
 static char *machine_get_kernel(Object *obj, Error **errp)
Signature · 1 line
2.52.0
Reviewed-by on v1 4/4
#12 lore raw

Re: [PATCH 4/4] hw/core/machine: Remove the hw_compat_3_0[] array

Quoted 8 lines · Philippe Mathieu-Daudé

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

---
  include/hw/core/boards.h | 3 ---
  hw/core/machine.c        | 3 ---
  2 files changed, 6 deletions(-)
Reviewed-by on v1 4/4
#13 lore raw

Re: [PATCH 4/4] hw/core/machine: Remove the hw_compat_3_0[] array

In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

Date: Sat, 7 Mar 2026 16:00:42 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: [PATCH 4/4] hw/core/machine: Remove the hw_compat_3_0[] array
X-Mailer: git-send-email 2.52.0

Quoted 8 lines

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

---
 include/hw/core/boards.h | 3 ---
 hw/core/machine.c        | 3 ---
 2 files changed, 6 deletions(-)
#14 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

Philippe Mathieu-Daudé (4):

   hw/i386/pc: Remove deprecated pc-q35-3.0 and pc-i440fx-3.0 machines
   hw/i386/pc: Remove pc_compat_3_0[] array
   target/i386/kvm: Remove X86CPU::hyperv_synic_kvm_only field
   hw/core/machine: Remove the hw_compat_3_0[] array

Queued via hw-misc, thanks.