Skip to contentSkip to conversation

hw/arm/virt: Remove virt-4.1 and virt-4.2 machines

PATCH Applied Philippe Mathieu-Daudé 2 participants 8 messages Oct 20, 2025 – Oct 28, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover hw/arm/virt: Remove virt-4.1 and virt-4.2 machines

Since v1:
- Do not remove virt-6.0 -> virt-7.2 (danpb)

Remove the deprecated virt-4.1 and virt-4.2 machines, which are older than 6 years. Remove resulting dead code.

Philippe Mathieu-Daudé (4):
hw/arm/virt: Remove deprecated virt-4.1 machine hw/arm/virt: Remove VirtMachineClass::no_ged field hw/arm/virt: Remove deprecated virt-4.2 machine hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field

 include/hw/arm/virt.h |  2 --
 hw/arm/virt.c         | 29 +----------------------------
 2 files changed, 1 insertion(+), 30 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH v2 1/4 hw/arm/virt: Remove deprecated virt-4.1 machine

This machine 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") it can now be removed.

---
 hw/arm/virt.c | 11 -----------
 1 file changed, 11 deletions(-)
hw/arm/virt.c +0 -11
index 175023897a7..ed81f3fe8d8 100644
@@ -3701,14 +3701,3 @@ static void virt_machine_4_2_options(MachineClass *mc)
     vmc->kvm_no_adjvtime = true;
 }
 DEFINE_VIRT_MACHINE(4, 2)
-
-static void virt_machine_4_1_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_4_2_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_4_1, hw_compat_4_1_len);
-    vmc->no_ged = true;
-    mc->auto_enable_numa_with_memhp = false;
-}
-DEFINE_VIRT_MACHINE(4, 1)
Signature · 1 line
2.51.0
#2 lore raw

PATCH v2 2/4 hw/arm/virt: Remove VirtMachineClass::no_ged field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_ged field was only used by virt-4.1 machine, which got removed. Remove it as now unused.

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
include/hw/arm/virt.h +0 -1
index 04a09af3540..993872bb680 100644
@@ -123,7 +123,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool no_ged;   /* Machines < 4.2 have no support for ACPI GED device */
     bool kvm_no_adjvtime;
     bool no_kvm_steal_time;
     bool acpi_expose_flash;
hw/arm/virt.c +1 -2
index ed81f3fe8d8..2eda2d43974 100644
@@ -2210,7 +2210,6 @@ static void machvirt_init(MachineState *machine)
     int n, virt_max_cpus;
     bool firmware_loaded;
     bool aarch64 = true;
-    bool has_ged = !vmc->no_ged;
     unsigned int smp_cpus = machine->smp.cpus;
     unsigned int max_cpus = machine->smp.max_cpus;
 
@@ -2512,7 +2511,7 @@ static void machvirt_init(MachineState *machine)
     create_pcie(vms);
     create_cxl_host_reg_region(vms);
 
-    if (has_ged && aarch64 && firmware_loaded && virt_is_acpi_enabled(vms)) {
+    if (aarch64 && firmware_loaded && virt_is_acpi_enabled(vms)) {
         vms->acpi_dev = create_acpi_ged(vms);
         vms->generic_error_notifier.notify = virt_generic_error_req;
         notifier_list_add(&acpi_generic_error_notifiers,
Signature · 1 line
2.51.0
#3 lore raw

PATCH v2 3/4 hw/arm/virt: Remove deprecated virt-4.2 machine

In reply to Philippe Mathieu-Daudé

This machine 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") it can now be removed.

---
 hw/arm/virt.c | 10 ----------
 1 file changed, 10 deletions(-)
hw/arm/virt.c +0 -10
index 2eda2d43974..b781a218019 100644
@@ -3690,13 +3690,3 @@ static void virt_machine_5_0_options(MachineClass *mc)
     mc->auto_enable_numa_with_memdev = false;
 }
 DEFINE_VIRT_MACHINE(5, 0)
-
-static void virt_machine_4_2_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_5_0_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len);
-    vmc->kvm_no_adjvtime = true;
-}
-DEFINE_VIRT_MACHINE(4, 2)
Signature · 1 line
2.51.0
#4 lore raw

PATCH v2 4/4 hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::kvm_no_adjvtime field was only used by the virt-4.2 machine, which got removed. Remove it as now unused, but keep the ARMCPU homonym property.

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 5 -----
 2 files changed, 6 deletions(-)
include/hw/arm/virt.h +0 -1
index 993872bb680..c77a33f6df2 100644
@@ -123,7 +123,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool kvm_no_adjvtime;
     bool no_kvm_steal_time;
     bool acpi_expose_flash;
     bool no_secure_gpio;
hw/arm/virt.c +0 -5
index b781a218019..ffbddb711f6 100644
@@ -2362,11 +2362,6 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "has_el2", false, NULL);
         }
 
-        if (vmc->kvm_no_adjvtime &&
-            object_property_find(cpuobj, "kvm-no-adjvtime")) {
-            object_property_set_bool(cpuobj, "kvm-no-adjvtime", true, NULL);
-        }
-
         if (vmc->no_kvm_steal_time &&
             object_property_find(cpuobj, "kvm-steal-time")) {
             object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL);
Signature · 1 line
2.51.0
#5 lore raw

Re: [PATCH v2 4/4] hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field

Quoted 29 lines · Philippe Mathieu-Daudé

The VirtMachineClass::kvm_no_adjvtime field was only used by the virt-4.2 machine, which got removed. Remove it as now unused, but keep the ARMCPU homonym property.

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 5 -----
 2 files changed, 6 deletions(-)
include/hw/arm/virt.h +0 -1
index 993872bb680..c77a33f6df2 100644
@@ -123,7 +123,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool kvm_no_adjvtime;
     bool no_kvm_steal_time;
     bool acpi_expose_flash;
     bool no_secure_gpio;
hw/arm/virt.c +0 -0
index b781a218019..ffbddb711f6 100644
@@ -2362,11 +2362,6 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "has_el2", false, NULL);

hw/arm/virt.c static void machvirt_init(MachineState *machine) · line 2367

Quoted 10 lines
hw/arm/virt.c +0 -5
         }
 
-        if (vmc->kvm_no_adjvtime &&
-            object_property_find(cpuobj, "kvm-no-adjvtime")) {
-            object_property_set_bool(cpuobj, "kvm-no-adjvtime", true, NULL);
-        }
-
         if (vmc->no_kvm_steal_time &&
             object_property_find(cpuobj, "kvm-steal-time")) {
             object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL);

Can we / should we start the deprecate-and-drop process for the CPU kvm-no-adjvtime property now ?

-- PMM

#6 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

Since v1:
- Do not remove virt-6.0 -> virt-7.2 (danpb)

Remove the deprecated virt-4.1 and virt-4.2 machines, which are older than 6 years. Remove resulting dead code.

Philippe Mathieu-Daudé (4):
hw/arm/virt: Remove deprecated virt-4.1 machine hw/arm/virt: Remove VirtMachineClass::no_ged field hw/arm/virt: Remove deprecated virt-4.2 machine hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field

Ping?

#7 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé

Since v1:
- Do not remove virt-6.0 -> virt-7.2 (danpb)

Quoted 9 lines

Remove the deprecated virt-4.1 and virt-4.2 machines, which are older than 6 years. Remove resulting dead code.

Philippe Mathieu-Daudé (4):
hw/arm/virt: Remove deprecated virt-4.1 machine hw/arm/virt: Remove VirtMachineClass::no_ged field hw/arm/virt: Remove deprecated virt-4.2 machine hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field

Applied to target-arm.next, thanks.

-- PMM