Skip to contentSkip to conversation

hw/arm: Remove virt-2.6 up to virt-2.12 machines

PATCH Superseded Philippe Mathieu-Daudé 2 participants 23 messages Jan 15, 2025 – Jan 16, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hw/arm: Remove virt-2.6 up to virt-2.12 machines

The versioned 'virt' machines up to 2.12 been marked as deprecated two releases ago, and are older than 6 years, so according to our support policy we can remove them. Remove associated dead code.

Philippe Mathieu-Daudé (13):
hw/arm/virt: Remove deprecated virt-2.6 machine hw/arm/virt: Remove VirtMachineClass::no_pmu field hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment hw/arm/virt: Remove deprecated virt-2.7 machine hw/arm/virt: Remove VirtMachineClass::no_its field hw/arm/virt: Remove deprecated virt-2.8 machine hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers
field
hw/arm/virt: Remove deprecated virt-2.9 machine hw/arm/virt: Remove deprecated virt-2.10 machine hw/arm/virt: Remove deprecated virt-2.11 machine hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field hw/arm/virt: Remove deprecated virt-2.12 machine hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field

 docs/about/removed-features.rst    |   4 +
 include/hw/arm/virt.h              |   6 --
 include/hw/intc/arm_gic.h          |   1 -
 include/hw/intc/arm_gicv3_common.h |   3 -
 hw/arm/virt-acpi-build.c           |  10 +--
 hw/arm/virt.c                      | 122 ++---------------------------
 6 files changed, 15 insertions(+), 131 deletions(-)
Signature · 1 line
2.47.1
#1 lore raw

PATCH 1/13 hw/arm/virt: Remove deprecated virt-2.6 machine

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

---
 docs/about/removed-features.rst |  4 ++++
 hw/arm/virt.c                   | 12 ------------
 2 files changed, 4 insertions(+), 12 deletions(-)
docs/about/removed-features.rst +4 -0
index c6616ce05e5..813988fad4a 100644
@@ -1065,6 +1065,10 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
+Arm ``virt-2.6`` (removed in 10.0)
+''''''''''''''''''''''''''''''''''
+This versioned machine has been supported for a period of more than 6 years.
+
 linux-user mode CPUs
 --------------------
 
hw/arm/virt.c +0 -12
index 99e0a68b6c5..3bb8a9c7bd6 100644
@@ -3606,15 +3606,3 @@ static void virt_machine_2_7_options(MachineClass *mc)
     mc->minimum_page_bits = 0;
 }
 DEFINE_VIRT_MACHINE(2, 7)
-
-static void virt_machine_2_6_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_2_7_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_6, hw_compat_2_6_len);
-    vmc->disallow_affinity_adjustment = true;
-    /* Disable PMU for 2.6 as PMU support was first introduced in 2.7 */
-    vmc->no_pmu = true;
-}
-DEFINE_VIRT_MACHINE(2, 6)
Signature · 1 line
2.47.1
#2 lore raw

Re: [PATCH 01/13] hw/arm/virt: Remove deprecated virt-2.6 machine

Quoted 1 line · Philippe Mathieu-Daudé

This machines has been supported for a period of more than 6 years.

Typo in all this series :/ To be replaced by "This machine".

Quoted 9 lines

According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") it can now be removed.

---
  docs/about/removed-features.rst |  4 ++++
  hw/arm/virt.c                   | 12 ------------
  2 files changed, 4 insertions(+), 12 deletions(-)
Reviewed-by on v1 1/13
#3 lore raw

Re: [PATCH 01/13] hw/arm/virt: Remove deprecated virt-2.6 machine

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

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

---
  docs/about/removed-features.rst |  4 ++++
  hw/arm/virt.c                   | 12 ------------
  2 files changed, 4 insertions(+), 12 deletions(-)
docs/about/removed-features.rst +0 -0
index c6616ce05e5..813988fad4a 100644

docs/about/removed-features.rst for all machine types using the PXA2xx and OMAP2 SoCs. We are also · line 1070

Quoted 6 lines
docs/about/removed-features.rst +3 -0
@@ -1065,6 +1065,10 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
  dropping the ``cheetah`` OMAP1 board, because we don't have any
  test images for it and don't know of anybody who does.
 
+Arm ``virt-2.6`` (removed in 10.0)
+''''''''''''''''''''''''''''''''''
+This versioned machine has been supported for a period of more than 6 years.

I'd like to suggest that we rather add a generic statement to this file instead:

https://lore.kernel.org/qemu-devel/[email protected]/

Quoted 13 lines
docs/about/removed-features.rst +0 -0
  linux-user mode CPUs
  --------------------
 
hw/arm/virt.c +0 -2
index 99e0a68b6c5..3bb8a9c7bd6 100644
@@ -3606,15 +3606,3 @@ static void virt_machine_2_7_options(MachineClass *mc)
      mc->minimum_page_bits = 0;
  }
  DEFINE_VIRT_MACHINE(2, 7)
-
-static void virt_machine_2_6_options(MachineClass *mc)

hw/arm/virt.c static void virt_machine_2_7_options(MachineClass *mc) · line 3620

Quoted 10 lines
hw/arm/virt.c +0 -10
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_2_7_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_6, hw_compat_2_6_len);
-    vmc->disallow_affinity_adjustment = true;
-    /* Disable PMU for 2.6 as PMU support was first introduced in 2.7 */
-    vmc->no_pmu = true;
-}
-DEFINE_VIRT_MACHINE(2, 6)
#4 lore raw

PATCH 2/13 hw/arm/virt: Remove VirtMachineClass::no_pmu field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_pmu field was only used by virt-2.6 machine, which got removed. Remove it and simplify machvirt_init().

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 4 ----
 2 files changed, 5 deletions(-)
include/hw/arm/virt.h +0 -1
index c8e94e6aedc..27c5bb585cb 100644
@@ -120,7 +120,6 @@ struct VirtMachineClass {
     bool disallow_affinity_adjustment;
     bool no_its;
     bool no_tcg_its;
-    bool no_pmu;
     bool claim_edge_triggered_timers;
     bool smbios_old_sys_ver;
     bool no_highmem_compact;
hw/arm/virt.c +0 -4
index 3bb8a9c7bd6..0080577e1a9 100644
@@ -2262,10 +2262,6 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL);
         }
 
-        if (vmc->no_pmu && object_property_find(cpuobj, "pmu")) {
-            object_property_set_bool(cpuobj, "pmu", false, NULL);
-        }
-
         if (vmc->no_tcg_lpa2 && object_property_find(cpuobj, "lpa2")) {
             object_property_set_bool(cpuobj, "lpa2", false, NULL);
         }
Signature · 1 line
2.47.1
Reviewed-by on v1 2/13
#5 lore raw

Re: [PATCH 02/13] hw/arm/virt: Remove VirtMachineClass::no_pmu field

Quoted 9 lines · Philippe Mathieu-Daudé

The VirtMachineClass::no_pmu field was only used by virt-2.6 machine, which got removed. Remove it and simplify machvirt_init().

---
  include/hw/arm/virt.h | 1 -
  hw/arm/virt.c         | 4 ----
  2 files changed, 5 deletions(-)
#6 lore raw

PATCH 3/13 hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::disallow_affinity_adjustment field was only used by virt-2.6 machine, which got removed. Remove it along with the GIC*_TARGETLIST_BITS definitions, and simplify virt_cpu_mp_affinity().

---
 include/hw/arm/virt.h              |  1 -
 include/hw/intc/arm_gic.h          |  1 -
 include/hw/intc/arm_gicv3_common.h |  3 ---
 hw/arm/virt.c                      | 16 ----------------
 4 files changed, 21 deletions(-)
include/hw/arm/virt.h +0 -1
index 27c5bb585cb..5d3b25509ff 100644
@@ -117,7 +117,6 @@ typedef enum VirtGICType {
 
 struct VirtMachineClass {
     MachineClass parent;
-    bool disallow_affinity_adjustment;
     bool no_its;
     bool no_tcg_its;
     bool claim_edge_triggered_timers;
include/hw/intc/arm_gic.h +0 -1
index 48f6a51a70a..f5e6e5e70b4 100644
@@ -68,7 +68,6 @@
 #include "qom/object.h"
 
 /* Number of SGI target-list bits */
-#define GIC_TARGETLIST_BITS 8
 #define GIC_MAX_PRIORITY_BITS 8
 #define GIC_MIN_PRIORITY_BITS 4
 
include/hw/intc/arm_gicv3_common.h +0 -3
index a3d6a0e5077..fff5e55a97d 100644
@@ -45,9 +45,6 @@
 #define GICV3_REDIST_SIZE 0x20000
 #define GICV4_REDIST_SIZE 0x40000
 
-/* Number of SGI target-list bits */
-#define GICV3_TARGETLIST_BITS 16
-
 /* Maximum number of list registers (architectural limit) */
 #define GICV3_LR_MAX 16
 
hw/arm/virt.c +0 -16
index 0080577e1a9..2a2a0bd9154 100644
@@ -1760,23 +1760,7 @@ void virt_machine_done(Notifier *notifier, void *data)
 static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
 {
     uint8_t clustersz = ARM_DEFAULT_CPUS_PER_CLUSTER;
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
 
-    if (!vmc->disallow_affinity_adjustment) {
-        /* Adjust MPIDR like 64-bit KVM hosts, which incorporate the
-         * GIC's target-list limitations. 32-bit KVM hosts currently
-         * always create clusters of 4 CPUs, but that is expected to
-         * change when they gain support for gicv3. When KVM is enabled
-         * it will override the changes we make here, therefore our
-         * purposes are to make TCG consistent (with 64-bit KVM hosts)
-         * and to improve SGI efficiency.
-         */
-        if (vms->gic_version == VIRT_GIC_VERSION_2) {
-            clustersz = GIC_TARGETLIST_BITS;
-        } else {
-            clustersz = GICV3_TARGETLIST_BITS;
-        }
-    }
     return arm_build_mp_affinity(idx, clustersz);
 }
 
Signature · 1 line
2.47.1
#7 lore raw

Re: [PATCH 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment

Quoted 56 lines · Philippe Mathieu-Daudé

The VirtMachineClass::disallow_affinity_adjustment field was only used by virt-2.6 machine, which got removed. Remove it along with the GIC*_TARGETLIST_BITS definitions, and simplify virt_cpu_mp_affinity().

---
  include/hw/arm/virt.h              |  1 -
  include/hw/intc/arm_gic.h          |  1 -
  include/hw/intc/arm_gicv3_common.h |  3 ---
  hw/arm/virt.c                      | 16 ----------------
  4 files changed, 21 deletions(-)
include/hw/arm/virt.h +0 -1
index 27c5bb585cb..5d3b25509ff 100644
@@ -117,7 +117,6 @@ typedef enum VirtGICType {
 
  struct VirtMachineClass {
      MachineClass parent;
-    bool disallow_affinity_adjustment;
      bool no_its;
      bool no_tcg_its;
      bool claim_edge_triggered_timers;
include/hw/intc/arm_gic.h +0 -1
index 48f6a51a70a..f5e6e5e70b4 100644
@@ -68,7 +68,6 @@
  #include "qom/object.h"
 
  /* Number of SGI target-list bits */
-#define GIC_TARGETLIST_BITS 8
  #define GIC_MAX_PRIORITY_BITS 8
  #define GIC_MIN_PRIORITY_BITS 4
 
include/hw/intc/arm_gicv3_common.h +0 -3
index a3d6a0e5077..fff5e55a97d 100644
@@ -45,9 +45,6 @@
  #define GICV3_REDIST_SIZE 0x20000
  #define GICV4_REDIST_SIZE 0x40000
 
-/* Number of SGI target-list bits */
-#define GICV3_TARGETLIST_BITS 16
-
  /* Maximum number of list registers (architectural limit) */
  #define GICV3_LR_MAX 16
 
hw/arm/virt.c +0 -0
index 0080577e1a9..2a2a0bd9154 100644

hw/arm/virt.c void virt_machine_done(Notifier *notifier, void *data) · line 1765

Quoted 6 lines
hw/arm/virt.c +0 -2
@@ -1760,23 +1760,7 @@ void virt_machine_done(Notifier *notifier, void *data)
  static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
  {
      uint8_t clustersz = ARM_DEFAULT_CPUS_PER_CLUSTER;
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
 
-    if (!vmc->disallow_affinity_adjustment) {

I think this change is wrong - disallow_affinity_adjustment is false for newer machines, so you removed code here that is still in use on newer machines?

Thomas

Quoted 17 lines
hw/arm/virt.c +0 -14
-        /* Adjust MPIDR like 64-bit KVM hosts, which incorporate the
-         * GIC's target-list limitations. 32-bit KVM hosts currently
-         * always create clusters of 4 CPUs, but that is expected to
-         * change when they gain support for gicv3. When KVM is enabled
-         * it will override the changes we make here, therefore our
-         * purposes are to make TCG consistent (with 64-bit KVM hosts)
-         * and to improve SGI efficiency.
-         */
-        if (vms->gic_version == VIRT_GIC_VERSION_2) {
-            clustersz = GIC_TARGETLIST_BITS;
-        } else {
-            clustersz = GICV3_TARGETLIST_BITS;
-        }
-    }
      return arm_build_mp_affinity(idx, clustersz);
  }
 
#8 lore raw

Re: [PATCH 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment

Quoted 52 lines · Thomas Huth
Quoted 51 lines · Philippe Mathieu-Daudé

The VirtMachineClass::disallow_affinity_adjustment field was only used by virt-2.6 machine, which got removed. Remove it along with the GIC*_TARGETLIST_BITS definitions, and simplify virt_cpu_mp_affinity().

---
  include/hw/arm/virt.h              |  1 - include/hw/intc/arm_gic.h          |  1 - include/hw/intc/arm_gicv3_common.h |  3 --- hw/arm/virt.c                      | 16 ----------------

  4 files changed, 21 deletions(-)
include/hw/arm/virt.h +0 -1
index 27c5bb585cb..5d3b25509ff 100644
@@ -117,7 +117,6 @@ typedef enum VirtGICType {
   struct VirtMachineClass {
       MachineClass parent;
-    bool disallow_affinity_adjustment;
       bool no_its;
       bool no_tcg_its;
       bool claim_edge_triggered_timers;
include/hw/intc/arm_gic.h +0 -1
index 48f6a51a70a..f5e6e5e70b4 100644
@@ -68,7 +68,6 @@
   #include "qom/object.h"
   /* Number of SGI target-list bits */
-#define GIC_TARGETLIST_BITS 8
   #define GIC_MAX_PRIORITY_BITS 8
   #define GIC_MIN_PRIORITY_BITS 4
include/hw/intc/arm_gicv3_common.h +0 -3
index a3d6a0e5077..fff5e55a97d 100644
@@ -45,9 +45,6 @@
   #define GICV3_REDIST_SIZE 0x20000
   #define GICV4_REDIST_SIZE 0x40000
-/* Number of SGI target-list bits */
-#define GICV3_TARGETLIST_BITS 16
-
   /* Maximum number of list registers (architectural limit) */
   #define GICV3_LR_MAX 16
hw/arm/virt.c +0 -0
index 0080577e1a9..2a2a0bd9154 100644
@@ -1760,23 +1760,7 @@ void virt_machine_done(Notifier *notifier, void 
Quoted 8 lines

hw/arm/virt.c void virt_machine_done(Notifier *notifier, void *data) · line 1765

Quoted 6 lines
hw/arm/virt.c +0 -2
 *data)
   static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
   {
       uint8_t clustersz = ARM_DEFAULT_CPUS_PER_CLUSTER;
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
-    if (!vmc->disallow_affinity_adjustment) {

I think this change is wrong - disallow_affinity_adjustment is false for newer machines, so you removed code here that is still in use on newer machines?

Oops :| Thanks, I've be a bit overzealous here...

#9 lore raw

PATCH 4/13 hw/arm/virt: Remove deprecated virt-2.7 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst |  6 +++---
 hw/arm/virt.c                   | 13 -------------
 2 files changed, 3 insertions(+), 16 deletions(-)
docs/about/removed-features.rst +3 -3
index 813988fad4a..435f081d805 100644
@@ -1065,9 +1065,9 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` (removed in 10.0)
-''''''''''''''''''''''''''''''''''
-This versioned machine has been supported for a period of more than 6 years.
+Arm ``virt-2.6`` and ``virt-2.7`` (removed in 10.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''
+These versioned machines have been supported for a period of more than 6 years.
 
 linux-user mode CPUs
 --------------------
hw/arm/virt.c +0 -13
index 2a2a0bd9154..7747dae4dc7 100644
@@ -3573,16 +3573,3 @@ static void virt_machine_2_8_options(MachineClass *mc)
     vmc->claim_edge_triggered_timers = true;
 }
 DEFINE_VIRT_MACHINE(2, 8)
-
-static void virt_machine_2_7_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_2_8_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_7, hw_compat_2_7_len);
-    /* ITS was introduced with 2.8 */
-    vmc->no_its = true;
-    /* Stick with 1K pages for migration compatibility */
-    mc->minimum_page_bits = 0;
-}
-DEFINE_VIRT_MACHINE(2, 7)
Signature · 1 line
2.47.1
#10 lore raw

PATCH 5/13 hw/arm/virt: Remove VirtMachineClass::no_its field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_its field was only used by virt-2.7 machine, which got removed. Remove it and simplify virt_instance_init() and virt_acpi_build().

---
 include/hw/arm/virt.h    |  1 -
 hw/arm/virt-acpi-build.c |  5 ++---
 hw/arm/virt.c            | 16 ++++++----------
 3 files changed, 8 insertions(+), 14 deletions(-)
include/hw/arm/virt.h +0 -1
index 5d3b25509ff..463ac09615e 100644
@@ -117,7 +117,6 @@ typedef enum VirtGICType {
 
 struct VirtMachineClass {
     MachineClass parent;
-    bool no_its;
     bool no_tcg_its;
     bool claim_edge_triggered_timers;
     bool smbios_old_sys_ver;
hw/arm/virt-acpi-build.c +2 -3
index c9b13057a34..ccecea9e09b 100644
@@ -670,7 +670,6 @@ static void
 build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
 {
     int i;
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     const MemMapEntry *memmap = vms->memmap;
     AcpiTable table = { .sig = "APIC", .rev = 4, .oem_id = vms->oem_id,
                         .oem_table_id = vms->oem_table_id };
@@ -741,7 +740,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
                                           memmap[VIRT_HIGH_GIC_REDIST2].size);
         }
 
-        if (its_class_name() && !vmc->no_its) {
+        if (its_class_name()) {
             /*
              * ACPI spec, Revision 6.0 Errata A
              * (original 6.0 definition has invalid Length)
@@ -974,7 +973,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
                           vms->oem_table_id);
     }
 
-    if (its_class_name() && !vmc->no_its) {
+    if (its_class_name()) {
         acpi_add_table(table_offsets, tables_blob);
         build_iort(tables_blob, tables->linker, vms);
     }
hw/arm/virt.c +6 -10
index 7747dae4dc7..d7a7cee79df 100644
@@ -3278,17 +3278,13 @@ static void virt_instance_init(Object *obj)
     vms->highmem_mmio = true;
     vms->highmem_redists = true;
 
-    if (vmc->no_its) {
-        vms->its = false;
-    } else {
-        /* Default allows ITS instantiation */
-        vms->its = true;
+    /* Default allows ITS instantiation */
+    vms->its = true;
 
-        if (vmc->no_tcg_its) {
-            vms->tcg_its = false;
-        } else {
-            vms->tcg_its = true;
-        }
+    if (vmc->no_tcg_its) {
+        vms->tcg_its = false;
+    } else {
+        vms->tcg_its = true;
     }
 
     /* Default disallows iommu instantiation */
Signature · 1 line
2.47.1
Reviewed-by on v1 5/13
#11 lore raw

Re: [PATCH 05/13] hw/arm/virt: Remove VirtMachineClass::no_its field

Quoted 10 lines · Philippe Mathieu-Daudé

The VirtMachineClass::no_its field was only used by virt-2.7 machine, which got removed. Remove it and simplify virt_instance_init() and virt_acpi_build().

---
  include/hw/arm/virt.h    |  1 -
  hw/arm/virt-acpi-build.c |  5 ++---
  hw/arm/virt.c            | 16 ++++++----------
  3 files changed, 8 insertions(+), 14 deletions(-)
#12 lore raw

PATCH 6/13 hw/arm/virt: Remove deprecated virt-2.8 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst |  4 ++--
 hw/arm/virt.c                   | 13 -------------
 2 files changed, 2 insertions(+), 15 deletions(-)
docs/about/removed-features.rst +2 -2
index 435f081d805..732ec2cd05d 100644
@@ -1065,8 +1065,8 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` and ``virt-2.7`` (removed in 10.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''
+Arm ``virt-2.6`` up to ``virt-2.8`` (removed in 10.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''
 These versioned machines have been supported for a period of more than 6 years.
 
 linux-user mode CPUs
hw/arm/virt.c +0 -13
index d7a7cee79df..4ec94190769 100644
@@ -3556,16 +3556,3 @@ static void virt_machine_2_9_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_2_9, hw_compat_2_9_len);
 }
 DEFINE_VIRT_MACHINE(2, 9)
-
-static void virt_machine_2_8_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_2_9_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_8, hw_compat_2_8_len);
-    /* For 2.8 and earlier we falsely claimed in the DT that
-     * our timers were edge-triggered, not level-triggered.
-     */
-    vmc->claim_edge_triggered_timers = true;
-}
-DEFINE_VIRT_MACHINE(2, 8)
Signature · 1 line
2.47.1
#13 lore raw

PATCH 7/13 hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::claim_edge_triggered_timers field was only used by virt-2.8 machine, which got removed. Remove it and simplify fdt_add_timer_nodes() and build_gtdt().

---
 include/hw/arm/virt.h    | 1 -
 hw/arm/virt-acpi-build.c | 5 +----
 hw/arm/virt.c            | 5 -----
 3 files changed, 1 insertion(+), 10 deletions(-)
include/hw/arm/virt.h +0 -1
index 463ac09615e..9c531e28d04 100644
@@ -118,7 +118,6 @@ typedef enum VirtGICType {
 struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
-    bool claim_edge_triggered_timers;
     bool smbios_old_sys_ver;
     bool no_highmem_compact;
     bool no_highmem_ecam;
hw/arm/virt-acpi-build.c +1 -4
index ccecea9e09b..6e04fea165a 100644
@@ -537,15 +537,12 @@ build_srat(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
 static void
 build_gtdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
 {
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     /*
      * Table 5-117 Flag Definitions
      * set only "Timer interrupt Mode" and assume "Timer Interrupt
      * polarity" bit as '0: Interrupt is Active high'
      */
-    uint32_t irqflags = vmc->claim_edge_triggered_timers ?
-        1 : /* Interrupt is Edge triggered */
-        0;  /* Interrupt is Level triggered  */
+    const uint32_t irqflags = 0;  /* Interrupt is Level triggered  */
     AcpiTable table = { .sig = "GTDT", .rev = 3, .oem_id = vms->oem_id,
                         .oem_table_id = vms->oem_table_id };
 
hw/arm/virt.c +0 -5
index 4ec94190769..ec47ee4755a 100644
@@ -361,14 +361,9 @@ static void fdt_add_timer_nodes(const VirtMachineState *vms)
      * the correct information.
      */
     ARMCPU *armcpu;
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     uint32_t irqflags = GIC_FDT_IRQ_FLAGS_LEVEL_HI;
     MachineState *ms = MACHINE(vms);
 
-    if (vmc->claim_edge_triggered_timers) {
-        irqflags = GIC_FDT_IRQ_FLAGS_EDGE_LO_HI;
-    }
-
     if (vms->gic_version == VIRT_GIC_VERSION_2) {
         irqflags = deposit32(irqflags, GIC_FDT_IRQ_PPI_CPU_START,
                              GIC_FDT_IRQ_PPI_CPU_WIDTH,
Signature · 1 line
2.47.1
Reviewed-by on v1 7/13
#14 lore raw

Re: [PATCH 07/13] hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers field

Quoted 10 lines · Philippe Mathieu-Daudé

The VirtMachineClass::claim_edge_triggered_timers field was only used by virt-2.8 machine, which got removed. Remove it and simplify fdt_add_timer_nodes() and build_gtdt().

---
  include/hw/arm/virt.h    | 1 -
  hw/arm/virt-acpi-build.c | 5 +----
  hw/arm/virt.c            | 5 -----
  3 files changed, 1 insertion(+), 10 deletions(-)
#15 lore raw

PATCH 8/13 hw/arm/virt: Remove deprecated virt-2.9 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst | 2 +-
 hw/arm/virt.c                   | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)
docs/about/removed-features.rst +1 -1
index 732ec2cd05d..dbd04b00e4d 100644
@@ -1065,7 +1065,7 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` up to ``virt-2.8`` (removed in 10.0)
+Arm ``virt-2.6`` up to ``virt-2.9`` (removed in 10.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''
 These versioned machines have been supported for a period of more than 6 years.
 
hw/arm/virt.c +0 -7
index ec47ee4755a..6ba75a91574 100644
@@ -3544,10 +3544,3 @@ static void virt_machine_2_10_options(MachineClass *mc)
     mc->ignore_memory_transaction_failures = true;
 }
 DEFINE_VIRT_MACHINE(2, 10)
-
-static void virt_machine_2_9_options(MachineClass *mc)
-{
-    virt_machine_2_10_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_9, hw_compat_2_9_len);
-}
-DEFINE_VIRT_MACHINE(2, 9)
Signature · 1 line
2.47.1
#16 lore raw

PATCH 9/13 hw/arm/virt: Remove deprecated virt-2.10 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst | 4 ++--
 hw/arm/virt.c                   | 9 ---------
 2 files changed, 2 insertions(+), 11 deletions(-)
docs/about/removed-features.rst +2 -2
index dbd04b00e4d..7c8b98fcdf9 100644
@@ -1065,8 +1065,8 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` up to ``virt-2.9`` (removed in 10.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''
+Arm ``virt-2.6`` up to ``virt-2.10`` (removed in 10.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''
 These versioned machines have been supported for a period of more than 6 years.
 
 linux-user mode CPUs
hw/arm/virt.c +0 -9
index 6ba75a91574..dd44fb30773 100644
@@ -3535,12 +3535,3 @@ static void virt_machine_2_11_options(MachineClass *mc)
     vmc->smbios_old_sys_ver = true;
 }
 DEFINE_VIRT_MACHINE(2, 11)
-
-static void virt_machine_2_10_options(MachineClass *mc)
-{
-    virt_machine_2_11_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_10, hw_compat_2_10_len);
-    /* before 2.11 we never faulted accesses to bad addresses */
-    mc->ignore_memory_transaction_failures = true;
-}
-DEFINE_VIRT_MACHINE(2, 10)
Signature · 1 line
2.47.1
#17 lore raw

PATCH 10/13 hw/arm/virt: Remove deprecated virt-2.11 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst |  2 +-
 hw/arm/virt.c                   | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)
docs/about/removed-features.rst +1 -1
index 7c8b98fcdf9..0594bbd4363 100644
@@ -1065,7 +1065,7 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` up to ``virt-2.10`` (removed in 10.0)
+Arm ``virt-2.6`` up to ``virt-2.11`` (removed in 10.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
 These versioned machines have been supported for a period of more than 6 years.
 
hw/arm/virt.c +0 -10
index dd44fb30773..ae331df9349 100644
@@ -3525,13 +3525,3 @@ static void virt_machine_2_12_options(MachineClass *mc)
     mc->max_cpus = 255;
 }
 DEFINE_VIRT_MACHINE(2, 12)
-
-static void virt_machine_2_11_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_2_12_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_11, hw_compat_2_11_len);
-    vmc->smbios_old_sys_ver = true;
-}
-DEFINE_VIRT_MACHINE(2, 11)
Signature · 1 line
2.47.1
#18 lore raw

PATCH 11/13 hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::smbios_old_sys_ver field was only used by virt-2.11 machine, which got removed. Remove it and simplify virt_build_smbios().

---
 include/hw/arm/virt.h | 1 -
 hw/arm/virt.c         | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
include/hw/arm/virt.h +0 -1
index 9c531e28d04..b2cc012a402 100644
@@ -118,7 +118,6 @@ typedef enum VirtGICType {
 struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
-    bool smbios_old_sys_ver;
     bool no_highmem_compact;
     bool no_highmem_ecam;
     bool no_ged;   /* Machines < 4.2 have no support for ACPI GED device */
hw/arm/virt.c +1 -3
index ae331df9349..08117b396a6 100644
@@ -1688,7 +1688,6 @@ static void virt_build_smbios(VirtMachineState *vms)
 {
     MachineClass *mc = MACHINE_GET_CLASS(vms);
     MachineState *ms = MACHINE(vms);
-    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
     uint8_t *smbios_tables, *smbios_anchor;
     size_t smbios_tables_len, smbios_anchor_len;
     struct smbios_phys_mem_area mem_array;
@@ -1698,8 +1697,7 @@ static void virt_build_smbios(VirtMachineState *vms)
         product = "KVM Virtual Machine";
     }
 
-    smbios_set_defaults("QEMU", product,
-                        vmc->smbios_old_sys_ver ? "1.0" : mc->name);
+    smbios_set_defaults("QEMU", product, mc->name);
 
     /* build the array of physical mem area from base_memmap */
     mem_array.address = vms->memmap[VIRT_MEM].base;
Signature · 1 line
2.47.1
Reviewed-by on v1 11/13
#19 lore raw

Re: [PATCH 11/13] hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field

Quoted 9 lines · Philippe Mathieu-Daudé

The VirtMachineClass::smbios_old_sys_ver field was only used by virt-2.11 machine, which got removed. Remove it and simplify virt_build_smbios().

---
  include/hw/arm/virt.h | 1 -
  hw/arm/virt.c         | 4 +---
  2 files changed, 1 insertion(+), 4 deletions(-)
#20 lore raw

PATCH 12/13 hw/arm/virt: Remove deprecated virt-2.12 machine

In reply to Philippe Mathieu-Daudé

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

---
 docs/about/removed-features.rst |  2 +-
 hw/arm/virt.c                   | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)
docs/about/removed-features.rst +1 -1
index 0594bbd4363..c915b2cbd41 100644
@@ -1065,7 +1065,7 @@ for all machine types using the PXA2xx and OMAP2 SoCs. We are also
 dropping the ``cheetah`` OMAP1 board, because we don't have any
 test images for it and don't know of anybody who does.
 
-Arm ``virt-2.6`` up to ``virt-2.11`` (removed in 10.0)
+Arm ``virt-2.6`` up to ``virt-2.12`` (removed in 10.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
 These versioned machines have been supported for a period of more than 6 years.
 
hw/arm/virt.c +0 -11
index 08117b396a6..a607a66a198 100644
@@ -3512,14 +3512,3 @@ static void virt_machine_3_0_options(MachineClass *mc)
     compat_props_add(mc->compat_props, hw_compat_3_0, hw_compat_3_0_len);
 }
 DEFINE_VIRT_MACHINE(3, 0)
-
-static void virt_machine_2_12_options(MachineClass *mc)
-{
-    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
-    virt_machine_3_0_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_2_12, hw_compat_2_12_len);
-    vmc->no_highmem_ecam = true;
-    mc->max_cpus = 255;
-}
-DEFINE_VIRT_MACHINE(2, 12)
Signature · 1 line
2.47.1
#21 lore raw

PATCH 13/13 hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field

In reply to Philippe Mathieu-Daudé

The VirtMachineClass::no_highmem_ecam field was only used by virt-2.12 machine, which got removed. Remove it and simplify virt_instance_init().

---
 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 b2cc012a402..9a1b0f53d21 100644
@@ -119,7 +119,6 @@ struct VirtMachineClass {
     MachineClass parent;
     bool no_tcg_its;
     bool no_highmem_compact;
-    bool no_highmem_ecam;
     bool no_ged;   /* Machines < 4.2 have no support for ACPI GED device */
     bool kvm_no_adjvtime;
     bool no_kvm_steal_time;
hw/arm/virt.c +1 -1
index a607a66a198..4de5ce3c541 100644
@@ -3267,7 +3267,7 @@ static void virt_instance_init(Object *obj)
     vms->highmem_compact = !vmc->no_highmem_compact;
     vms->gic_version = VIRT_GIC_VERSION_NOSEL;
 
-    vms->highmem_ecam = !vmc->no_highmem_ecam;
+    vms->highmem_ecam = true;
     vms->highmem_mmio = true;
     vms->highmem_redists = true;
 
Signature · 1 line
2.47.1
Reviewed-by on v1 13/13
#22 lore raw

Re: [PATCH 13/13] hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field

Quoted 9 lines · Philippe Mathieu-Daudé

The VirtMachineClass::no_highmem_ecam field was only used by virt-2.12 machine, which got removed. Remove it and simplify virt_instance_init().

---
  include/hw/arm/virt.h | 1 -
  hw/arm/virt.c         | 2 +-
  2 files changed, 1 insertion(+), 2 deletions(-)