Skip to contentSkip to conversation

hw/arm/virt: Remove virt-4.1 -> virt-7.2 machines

PATCH Superseded Philippe Mathieu-Daudé 2 participants 23 messages Oct 17, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hw/arm/virt: Remove virt-4.1 -> virt-7.2 machines

Remove the deprecated virt-4.1 up to virt-7.2 machines, which are older than 6 years. Remove resulting dead code.

Philippe Mathieu-Daudé (20):
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 hw/arm/virt: Remove deprecated virt-5.0 machine hw/arm/virt: Remove VirtMachineClass::acpi_expose_flash field hw/arm/virt: Remove deprecated virt-5.1 machine hw/arm/virt: Remove VirtMachineClass::no_kvm_steal_time field hw/arm/virt: Remove deprecated virt-5.2 machine hw/arm/virt: Remove VirtMachineClass::no_secure_gpio field hw/arm/virt: Remove deprecated virt-6.0 machine hw/arm/virt: Remove deprecated virt-6.1 machine hw/arm/virt: Remove VirtMachineClass::no_tcg_its field hw/arm/virt: Remove VirtMachineClass::no_cpu_topology field hw/arm/virt: Remove deprecated virt-6.2 machine hw/arm/virt: Remove VirtMachineClass::no_tcg_lpa2 field hw/arm/virt: Remove deprecated virt-7.0 machine hw/arm/virt: Remove deprecated virt-7.1 machine hw/arm/virt: Remove VirtMachineClass::no_highmem_compact field hw/arm/virt: Remove deprecated virt-7.2 machine

 include/hw/arm/virt.h    |  11 --
 hw/arm/virt-acpi-build.c |  37 +------
 hw/arm/virt.c            | 228 ++++++++-------------------------------
 3 files changed, 50 insertions(+), 226 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/20 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 2/20 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 3/20 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 4/20 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

PATCH 5/20 hw/arm/virt: Remove deprecated virt-5.0 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 | 12 ------------
 1 file changed, 12 deletions(-)
hw/arm/virt.c +0 -12
index ffbddb711f6..953b2e5a94f 100644
@@ -3673,15 +3673,3 @@ static void virt_machine_5_1_options(MachineClass *mc)
     vmc->no_kvm_steal_time = true;
 }
 DEFINE_VIRT_MACHINE(5, 1)
-
-static void virt_machine_5_0_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_5_1_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_0, hw_compat_5_0_len);
-    mc->numa_mem_supported = true;
-    vmc->acpi_expose_flash = true;
-    mc->auto_enable_numa_with_memdev = false;
-}
-DEFINE_VIRT_MACHINE(5, 0)
Signature · 1 line
2.51.0
#6 lore raw

PATCH 6/20 hw/arm/virt: Remove VirtMachineClass::acpi_expose_flash field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::acpi_expose_flash field was only used by the virt-5.0 machine, which got removed (see commit 2c1fb4d5c01 "hw/arm/virt-acpi-build: Only expose flash on older machine types" for more context). Remove it as now unused.

---
 include/hw/arm/virt.h    |  1 -
 hw/arm/virt-acpi-build.c | 28 ----------------------------
 2 files changed, 29 deletions(-)
include/hw/arm/virt.h +0 -1
index c77a33f6df2..ba16acb8626 100644
@@ -124,7 +124,6 @@ struct VirtMachineClass {
     bool no_tcg_its;
     bool no_highmem_compact;
     bool no_kvm_steal_time;
-    bool acpi_expose_flash;
     bool no_secure_gpio;
     /* Machines < 6.2 have no support for describing cpu topology to guest */
     bool no_cpu_topology;
hw/arm/virt-acpi-build.c +0 -28
index 8bb6b605154..5db5baa7cf3 100644
@@ -99,30 +99,6 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMapEntry *uart_memmap,
     aml_append(scope, dev);
 }
 
-static void acpi_dsdt_add_flash(Aml *scope, const MemMapEntry *flash_memmap)
-{
-    Aml *dev, *crs;
-    hwaddr base = flash_memmap->base;
-    hwaddr size = flash_memmap->size / 2;
-
-    dev = aml_device("FLS0");
-    aml_append(dev, aml_name_decl("_HID", aml_string("LNRO0015")));
-    aml_append(dev, aml_name_decl("_UID", aml_int(0)));
-
-    crs = aml_resource_template();
-    aml_append(crs, aml_memory32_fixed(base, size, AML_READ_WRITE));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-    aml_append(scope, dev);
-
-    dev = aml_device("FLS1");
-    aml_append(dev, aml_name_decl("_HID", aml_string("LNRO0015")));
-    aml_append(dev, aml_name_decl("_UID", aml_int(1)));
-    crs = aml_resource_template();
-    aml_append(crs, aml_memory32_fixed(base + size, size, AML_READ_WRITE));
-    aml_append(dev, aml_name_decl("_CRS", crs));
-    aml_append(scope, dev);
-}
-
 static void build_acpi0017(Aml *table)
 {
     Aml *dev, *scope, *method;
@@ -1011,7 +987,6 @@ static void build_fadt_rev6(GArray *table_data, BIOSLinker *linker,
 static void
 build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
 {
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     Aml *scope, *dsdt;
     MachineState *ms = MACHINE(vms);
     const MemMapEntry *memmap = vms->memmap;
@@ -1036,9 +1011,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
         acpi_dsdt_add_uart(scope, &memmap[VIRT_UART1],
                            (irqmap[VIRT_UART1] + ARM_SPI_BASE), 1);
     }
-    if (vmc->acpi_expose_flash) {
-        acpi_dsdt_add_flash(scope, &memmap[VIRT_FLASH]);
-    }
     fw_cfg_acpi_dsdt_add(scope, &memmap[VIRT_FW_CFG]);
     virtio_acpi_dsdt_add(scope, memmap[VIRT_MMIO].base, memmap[VIRT_MMIO].size,
                          (irqmap[VIRT_MMIO] + ARM_SPI_BASE),
Signature · 1 line
2.51.0
#7 lore raw

PATCH 7/20 hw/arm/virt: Remove deprecated virt-5.1 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 953b2e5a94f..b7ea180bcf0 100644
@@ -3663,13 +3663,3 @@ static void virt_machine_5_2_options(MachineClass *mc)
     vmc->no_secure_gpio = true;
 }
 DEFINE_VIRT_MACHINE(5, 2)
-
-static void virt_machine_5_1_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_5_2_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_1, hw_compat_5_1_len);
-    vmc->no_kvm_steal_time = true;
-}
-DEFINE_VIRT_MACHINE(5, 1)
Signature · 1 line
2.51.0
#8 lore raw

PATCH 8/20 hw/arm/virt: Remove VirtMachineClass::no_kvm_steal_time field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_kvm_steal_time field was only used by the virt-5.1 machine, which got removed. Remove it as now unused, but keep the ARMCPU "kvm-steal-time" 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 ba16acb8626..96f3569c290 100644
@@ -123,7 +123,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool no_kvm_steal_time;
     bool no_secure_gpio;
     /* Machines < 6.2 have no support for describing cpu topology to guest */
     bool no_cpu_topology;
hw/arm/virt.c +0 -5
index b7ea180bcf0..cd0df096de9 100644
@@ -2362,11 +2362,6 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "has_el2", false, NULL);
         }
 
-        if (vmc->no_kvm_steal_time &&
-            object_property_find(cpuobj, "kvm-steal-time")) {
-            object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL);
-        }
-
         if (vmc->no_tcg_lpa2 && object_property_find(cpuobj, "lpa2")) {
             object_property_set_bool(cpuobj, "lpa2", false, NULL);
         }
Signature · 1 line
2.51.0
#9 lore raw

PATCH 9/20 hw/arm/virt: Remove deprecated virt-5.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 cd0df096de9..e49af505431 100644
@@ -3648,13 +3648,3 @@ static void virt_machine_6_0_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_6_0, hw_compat_6_0_len);
 }
 DEFINE_VIRT_MACHINE(6, 0)
-
-static void virt_machine_5_2_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_6_0_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_2, hw_compat_5_2_len);
-    vmc->no_secure_gpio = true;
-}
-DEFINE_VIRT_MACHINE(5, 2)
Signature · 1 line
2.51.0
#10 lore raw

PATCH 10/20 hw/arm/virt: Remove VirtMachineClass::no_secure_gpio field

In reply to Philippe Mathieu-Daudé

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

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/hw/arm/virt.h +0 -1
index 96f3569c290..c5ccd6ec9ea 100644
@@ -123,7 +123,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool no_secure_gpio;
     /* Machines < 6.2 have no support for describing cpu topology to guest */
     bool no_cpu_topology;
     bool no_tcg_lpa2;
hw/arm/virt.c +1 -1
index e49af505431..33c0034b030 100644
@@ -2510,7 +2510,7 @@ static void machvirt_init(MachineState *machine)
         create_gpio_devices(vms, VIRT_GPIO, sysmem);
     }
 
-    if (vms->secure && !vmc->no_secure_gpio) {
+    if (vms->secure) {
         create_gpio_devices(vms, VIRT_SECURE_GPIO, secure_sysmem);
     }
 
Signature · 1 line
2.51.0
#11 lore raw

PATCH 11/20 hw/arm/virt: Remove deprecated virt-6.0 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 | 7 -------
 1 file changed, 7 deletions(-)
hw/arm/virt.c +0 -7
index 33c0034b030..f928a73272d 100644
@@ -3641,10 +3641,3 @@ static void virt_machine_6_1_options(MachineClass *mc)
     vmc->no_tcg_its = true;
 }
 DEFINE_VIRT_MACHINE(6, 1)
-
-static void virt_machine_6_0_options(MachineClass *mc)
-{
-    virt_machine_6_1_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_6_0, hw_compat_6_0_len);
-}
-DEFINE_VIRT_MACHINE(6, 0)
Signature · 1 line
2.51.0
#12 lore raw

PATCH 12/20 hw/arm/virt: Remove deprecated virt-6.1 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 | 14 --------------
 1 file changed, 14 deletions(-)
hw/arm/virt.c +0 -14
index f928a73272d..f23283e6ddd 100644
@@ -3627,17 +3627,3 @@ static void virt_machine_6_2_options(MachineClass *mc)
     vmc->no_tcg_lpa2 = true;
 }
 DEFINE_VIRT_MACHINE(6, 2)
-
-static void virt_machine_6_1_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_6_2_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
-    mc->smp_props.prefer_sockets = true;
-    vmc->no_cpu_topology = true;
-
-    /* qemu ITS was introduced with 6.2 */
-    vmc->no_tcg_its = true;
-}
-DEFINE_VIRT_MACHINE(6, 1)
Signature · 1 line
2.51.0
#13 lore raw

PATCH 13/20 hw/arm/virt: Remove VirtMachineClass::no_tcg_its field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_tcg_its field was only used by the virt-6.1 machine, which got removed. Remove it as now unused, along with the VirtMachineState::tcg_its field.

---
 include/hw/arm/virt.h |  2 --
 hw/arm/virt.c         | 12 ++++--------
 2 files changed, 4 insertions(+), 10 deletions(-)
include/hw/arm/virt.h +0 -2
index c5ccd6ec9ea..21d91a43d8b 100644
@@ -121,7 +121,6 @@ typedef enum VirtGICType {
 
 struct VirtMachineClass {
     MachineClass parent;
-    bool no_tcg_its;
     bool no_highmem_compact;
     /* Machines < 6.2 have no support for describing cpu topology to guest */
     bool no_cpu_topology;
@@ -144,7 +143,6 @@ struct VirtMachineState {
     bool highmem_mmio;
     bool highmem_redists;
     bool its;
-    bool tcg_its;
     bool virt;
     bool ras;
     bool mte;
hw/arm/virt.c +4 -8
index f23283e6ddd..3e7858d6e11 100644
@@ -735,7 +735,7 @@ static void create_its(VirtMachineState *vms)
     DeviceState *dev;
 
     assert(vms->its);
-    if (!kvm_irqchip_in_kernel() && !vms->tcg_its) {
+    if (!kvm_irqchip_in_kernel()) {
         /*
          * Do nothing if ITS is neither supported by the host nor emulated by
          * the machine.
@@ -857,11 +857,9 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem)
                             redist_region_count);
 
         if (!kvm_irqchip_in_kernel()) {
-            if (vms->tcg_its) {
-                object_property_set_link(OBJECT(vms->gic), "sysmem",
-                                         OBJECT(mem), &error_fatal);
-                qdev_prop_set_bit(vms->gic, "has-lpi", true);
-            }
+            object_property_set_link(OBJECT(vms->gic), "sysmem",
+                                     OBJECT(mem), &error_fatal);
+            qdev_prop_set_bit(vms->gic, "has-lpi", true);
         } else if (vms->virt) {
             qdev_prop_set_uint32(vms->gic, "maintenance-interrupt-id",
                                  ARCH_GIC_MAINT_IRQ);
@@ -3471,8 +3469,6 @@ static void virt_instance_init(Object *obj)
 
     /* Default allows ITS instantiation */
     vms->its = true;
-    /* Allow ITS emulation if the machine version supports it */
-    vms->tcg_its = !vmc->no_tcg_its;
 
     /* Default disallows iommu instantiation */
     vms->iommu = VIRT_IOMMU_NONE;
Signature · 1 line
2.51.0
#14 lore raw

PATCH 14/20 hw/arm/virt: Remove VirtMachineClass::no_cpu_topology field

In reply to Philippe Mathieu-Daudé

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

---
 include/hw/arm/virt.h    |  2 -
 hw/arm/virt-acpi-build.c |  9 ++---
 hw/arm/virt.c            | 85 +++++++++++++++++++---------------------
 3 files changed, 43 insertions(+), 53 deletions(-)
include/hw/arm/virt.h +0 -2
index 21d91a43d8b..ca2e59ec569 100644
@@ -122,8 +122,6 @@ typedef enum VirtGICType {
 struct VirtMachineClass {
     MachineClass parent;
     bool no_highmem_compact;
-    /* Machines < 6.2 have no support for describing cpu topology to guest */
-    bool no_cpu_topology;
     bool no_tcg_lpa2;
     bool no_ns_el2_virt_timer_irq;
     bool no_nested_smmu;
hw/arm/virt-acpi-build.c +3 -6
index 5db5baa7cf3..8d40570c1e3 100644
@@ -1110,7 +1110,6 @@ static const AcpiNotificationSourceId hest_ghes_notify_10_0[] = {
 static
 void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
 {
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     GArray *table_offsets;
     unsigned dsdt, xsdt;
     GArray *tables_blob = tables->table_data;
@@ -1134,11 +1133,9 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
     acpi_add_table(table_offsets, tables_blob);
     build_madt(tables_blob, tables->linker, vms);
 
-    if (!vmc->no_cpu_topology) {
-        acpi_add_table(table_offsets, tables_blob);
-        build_pptt(tables_blob, tables->linker, ms,
-                   vms->oem_id, vms->oem_table_id);
-    }
+    acpi_add_table(table_offsets, tables_blob);
+    build_pptt(tables_blob, tables->linker, ms,
+               vms->oem_id, vms->oem_table_id);
 
     acpi_add_table(table_offsets, tables_blob);
     build_gtdt(tables_blob, tables->linker, vms);
hw/arm/virt.c +40 -45

104 lines not on this page · raw message

Signature · 1 line
2.51.0
#15 lore raw

PATCH 15/20 hw/arm/virt: Remove deprecated virt-6.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 4243da3c87e..d9ec61e7354 100644
@@ -3608,13 +3608,3 @@ static void virt_machine_7_0_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len);
 }
 DEFINE_VIRT_MACHINE(7, 0)
-
-static void virt_machine_6_2_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_7_0_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
-    vmc->no_tcg_lpa2 = true;
-}
-DEFINE_VIRT_MACHINE(6, 2)
Signature · 1 line
2.51.0
#16 lore raw

PATCH 16/20 hw/arm/virt: Remove VirtMachineClass::no_tcg_lpa2 field

In reply to Philippe Mathieu-Daudé

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

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 4 ----
 2 files changed, 5 deletions(-)
include/hw/arm/virt.h +0 -1
index ca2e59ec569..ddbd2d78209 100644
@@ -122,7 +122,6 @@ typedef enum VirtGICType {
 struct VirtMachineClass {
     MachineClass parent;
     bool no_highmem_compact;
-    bool no_tcg_lpa2;
     bool no_ns_el2_virt_timer_irq;
     bool no_nested_smmu;
 };
hw/arm/virt.c +0 -4
index d9ec61e7354..eb0e0e1bee3 100644
@@ -2355,10 +2355,6 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "has_el2", false, NULL);
         }
 
-        if (vmc->no_tcg_lpa2 && object_property_find(cpuobj, "lpa2")) {
-            object_property_set_bool(cpuobj, "lpa2", false, NULL);
-        }
-
         if (object_property_find(cpuobj, "reset-cbar")) {
             object_property_set_int(cpuobj, "reset-cbar",
                                     vms->memmap[VIRT_CPUPERIPHS].base,
Signature · 1 line
2.51.0
#17 lore raw

PATCH 17/20 hw/arm/virt: Remove deprecated virt-7.0 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 | 7 -------
 1 file changed, 7 deletions(-)
hw/arm/virt.c +0 -7
index eb0e0e1bee3..7218badc8c7 100644
@@ -3597,10 +3597,3 @@ static void virt_machine_7_1_options(MachineClass *mc)
     vmc->no_highmem_compact = true;
 }
 DEFINE_VIRT_MACHINE(7, 1)
-
-static void virt_machine_7_0_options(MachineClass *mc)
-{
-    virt_machine_7_1_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len);
-}
-DEFINE_VIRT_MACHINE(7, 0)
Signature · 1 line
2.51.0
#18 lore raw

PATCH 18/20 hw/arm/virt: Remove deprecated virt-7.1 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 | 11 -----------
 1 file changed, 11 deletions(-)
hw/arm/virt.c +0 -11
index 7218badc8c7..4a8a2a91b07 100644
@@ -3586,14 +3586,3 @@ static void virt_machine_7_2_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_7_2, hw_compat_7_2_len);
 }
 DEFINE_VIRT_MACHINE(7, 2)
-
-static void virt_machine_7_1_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_7_2_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_7_1, hw_compat_7_1_len);
-    /* Compact layout for high memory regions was introduced with 7.2 */
-    vmc->no_highmem_compact = true;
-}
-DEFINE_VIRT_MACHINE(7, 1)
Signature · 1 line
2.51.0
#19 lore raw

PATCH 19/20 hw/arm/virt: Remove VirtMachineClass::no_highmem_compact field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_highmem_compact field was only used by virt-7.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 ddbd2d78209..0d2a951cf08 100644
@@ -121,7 +121,6 @@ typedef enum VirtGICType {
 
 struct VirtMachineClass {
     MachineClass parent;
-    bool no_highmem_compact;
     bool no_ns_el2_virt_timer_irq;
     bool no_nested_smmu;
 };
hw/arm/virt.c +1 -2
index 4a8a2a91b07..651ad4b5f63 100644
@@ -3438,7 +3438,6 @@ static void virt_machine_class_init(ObjectClass *oc, const void *data)
 static void virt_instance_init(Object *obj)
 {
     VirtMachineState *vms = VIRT_MACHINE(obj);
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
 
     /* EL3 is disabled by default on virt: this makes us consistent
      * between KVM and TCG for this board, and it also allows us to
@@ -3451,7 +3450,7 @@ static void virt_instance_init(Object *obj)
 
     /* High memory is enabled by default */
     vms->highmem = true;
-    vms->highmem_compact = !vmc->no_highmem_compact;
+    vms->highmem_compact = true;
     vms->gic_version = VIRT_GIC_VERSION_NOSEL;
 
     vms->highmem_ecam = true;
Signature · 1 line
2.51.0
#20 lore raw

PATCH 20/20 hw/arm/virt: Remove deprecated virt-7.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 | 7 -------
 1 file changed, 7 deletions(-)
hw/arm/virt.c +0 -7
index 651ad4b5f63..2da5b014e2a 100644
@@ -3578,10 +3578,3 @@ static void virt_machine_8_0_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_8_0, hw_compat_8_0_len);
 }
 DEFINE_VIRT_MACHINE(8, 0)
-
-static void virt_machine_7_2_options(MachineClass *mc)
-{
-    virt_machine_8_0_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_7_2, hw_compat_7_2_len);
-}
-DEFINE_VIRT_MACHINE(7, 2)
Signature · 1 line
2.51.0
#21 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 2 lines · Philippe Mathieu-Daudé

Remove the deprecated virt-4.1 up to virt-7.2 machines, which are older than 6 years. Remove resulting dead code.

Nope, that's too aggressive here too. Only the 4.1/4.2 machines can be removed. The others are all still reported as being valid machines with '-machine help' - they'll be automatically removed from that list once their expiry release cycle is started.

Quoted 23 lines

Philippe Mathieu-Daudé (20):
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 hw/arm/virt: Remove deprecated virt-5.0 machine hw/arm/virt: Remove VirtMachineClass::acpi_expose_flash field hw/arm/virt: Remove deprecated virt-5.1 machine hw/arm/virt: Remove VirtMachineClass::no_kvm_steal_time field hw/arm/virt: Remove deprecated virt-5.2 machine hw/arm/virt: Remove VirtMachineClass::no_secure_gpio field hw/arm/virt: Remove deprecated virt-6.0 machine hw/arm/virt: Remove deprecated virt-6.1 machine hw/arm/virt: Remove VirtMachineClass::no_tcg_its field hw/arm/virt: Remove VirtMachineClass::no_cpu_topology field hw/arm/virt: Remove deprecated virt-6.2 machine hw/arm/virt: Remove VirtMachineClass::no_tcg_lpa2 field hw/arm/virt: Remove deprecated virt-7.0 machine hw/arm/virt: Remove deprecated virt-7.1 machine hw/arm/virt: Remove VirtMachineClass::no_highmem_compact field hw/arm/virt: Remove deprecated virt-7.2 machine

Quoted 9 lines
 include/hw/arm/virt.h    |  11 --
 hw/arm/virt-acpi-build.c |  37 +------
 hw/arm/virt.c            | 228 ++++++++-------------------------------
 3 files changed, 50 insertions(+), 226 deletions(-)
Signature · 1 line
2.51.0

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#22 lore raw
Quoted 8 lines · Daniel P. Berrangé
Quoted 2 lines · Philippe Mathieu-Daudé

Remove the deprecated virt-4.1 up to virt-7.2 machines, which are older than 6 years. Remove resulting dead code.

Nope, that's too aggressive here too. Only the 4.1/4.2 machines can be removed. The others are all still reported as being valid machines with '-machine help' - they'll be automatically removed from that list once their expiry release cycle is started.

Right :/

Quoted 6 lines
Quoted 6 lines

Philippe Mathieu-Daudé (20):
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

So please only consider these 4 patches to review then.

Thanks,

Phil.