All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines
@ 2026-12-01  7:55 Thomas Huth
  2026-12-01  7:55 ` [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2026-12-01  7:55 UTC (permalink / raw)
  To: Harsh Prateek Bora, qemu-ppc; +Cc: Nicholas Piggin, Amit Machhiwal, qemu-devel

The pseries-5.x machines have already been disabled automatically
since they are older than 6 years. We can remove the related code now.

Thomas Huth (3):
  hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine
  hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine
  hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine

 include/hw/pci-host/spapr.h |  3 ---
 include/hw/ppc/spapr.h      |  2 --
 hw/ppc/spapr.c              | 44 -------------------------------------
 hw/ppc/spapr_numa.c         | 42 +++--------------------------------
 hw/ppc/spapr_pci.c          |  2 --
 5 files changed, 3 insertions(+), 90 deletions(-)

-- 
2.56.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine
  2026-12-01  7:55 [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines Thomas Huth
@ 2026-12-01  7:55 ` Thomas Huth
  2026-12-01  7:55 ` [PATCH 2/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine Thomas Huth
  2026-12-01  7:55 ` [PATCH 3/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2026-12-01  7:55 UTC (permalink / raw)
  To: Harsh Prateek Bora, qemu-ppc; +Cc: Nicholas Piggin, Amit Machhiwal, qemu-devel

The pseries-5.0 machine has already been disabled automatically
since it is older than 6 years. Remove this dead code now,
together with the now unused "pre_5_1_assoc" parts.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/pci-host/spapr.h |  3 ---
 include/hw/ppc/spapr.h      |  1 -
 hw/ppc/spapr.c              | 19 -------------------
 hw/ppc/spapr_numa.c         |  9 +--------
 hw/ppc/spapr_pci.c          |  2 --
 5 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 0db87f12815..3c9344fc611 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -81,9 +81,6 @@ struct SpaprPhbState {
     uint32_t numa_node;
 
     bool pcie_ecs; /* Allow access to PCIe extended config space? */
-
-    /* Fields for migration compatibility hacks */
-    bool pre_5_1_assoc;
 };
 
 #define SPAPR_PCI_MEM_WIN_BUS_OFFSET 0x80000000ULL
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 98a9099b8ab..4db3a267bac 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -143,7 +143,6 @@ struct SpaprCapabilities {
 struct SpaprMachineClass {
     MachineClass parent_class;
 
-    bool pre_5_1_assoc_refpoints;
     bool pre_5_2_numa_associativity;
     bool pre_6_2_numa_affinity;
     SpaprResizeHpt resize_hpt_default;
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 54e3cc3cbe4..2c203622657 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4999,25 +4999,6 @@ static void spapr_machine_5_1_class_options(MachineClass *mc)
 
 DEFINE_SPAPR_MACHINE(5, 1);
 
-/*
- * pseries-5.0
- */
-static void spapr_machine_5_0_class_options(MachineClass *mc)
-{
-    SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
-    static GlobalProperty compat[] = {
-        { TYPE_SPAPR_PCI_HOST_BRIDGE, "pre-5.1-associativity", "on" },
-    };
-
-    spapr_machine_5_1_class_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_0, hw_compat_5_0_len);
-    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
-    mc->numa_mem_supported = true;
-    smc->pre_5_1_assoc_refpoints = true;
-}
-
-DEFINE_SPAPR_MACHINE(5, 0);
-
 static void spapr_machine_register_types(void)
 {
     type_register_static(&spapr_machine_info);
diff --git a/hw/ppc/spapr_numa.c b/hw/ppc/spapr_numa.c
index ea6762d3d2b..faa35f12275 100644
--- a/hw/ppc/spapr_numa.c
+++ b/hw/ppc/spapr_numa.c
@@ -283,9 +283,7 @@ static void spapr_numa_FORM1_affinity_init(SpaprMachineState *spapr,
         spapr->FORM1_assoc_array[i][0] = cpu_to_be32(FORM1_DIST_REF_POINTS);
 
         for (j = 1; j < FORM1_DIST_REF_POINTS; j++) {
-            uint32_t gpu_assoc = smc->pre_5_1_assoc_refpoints ?
-                                 SPAPR_GPU_NUMA_ID : cpu_to_be32(i);
-            spapr->FORM1_assoc_array[i][j] = gpu_assoc;
+            spapr->FORM1_assoc_array[i][j] = cpu_to_be32(i);
         }
 
         spapr->FORM1_assoc_array[i][FORM1_DIST_REF_POINTS] = cpu_to_be32(i);
@@ -471,11 +469,6 @@ static void spapr_numa_FORM1_write_rtas_dt(SpaprMachineState *spapr,
 
         memcpy(refpoints, legacy_refpoints, sizeof(legacy_refpoints));
         memcpy(maxdomains, legacy_maxdomains, sizeof(legacy_maxdomains));
-
-        /* pseries-5.0 and older reference-points array is {0x4, 0x4} */
-        if (smc->pre_5_1_assoc_refpoints) {
-            nr_refpoints = 2;
-        }
     }
 
     _FDT(fdt_setprop(fdt, rtas, "ibm,associativity-reference-points",
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index ea323fa0989..fd7eac90277 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2042,8 +2042,6 @@ static const Property spapr_phb_properties[] = {
     DEFINE_PROP_UINT32("numa_node", SpaprPhbState, numa_node, -1),
     DEFINE_PROP_BOOL("pcie-extended-configuration-space", SpaprPhbState,
                      pcie_ecs, true),
-    DEFINE_PROP_BOOL("pre-5.1-associativity", SpaprPhbState,
-                     pre_5_1_assoc, false),
 };
 
 static const VMStateDescription vmstate_spapr_pci_lsi = {
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine
  2026-12-01  7:55 [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines Thomas Huth
  2026-12-01  7:55 ` [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine Thomas Huth
@ 2026-12-01  7:55 ` Thomas Huth
  2026-12-01  7:55 ` [PATCH 3/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2026-12-01  7:55 UTC (permalink / raw)
  To: Harsh Prateek Bora, qemu-ppc; +Cc: Nicholas Piggin, Amit Machhiwal, qemu-devel

The pseries-5.1 machine has already been disabled automatically
since it is older than 6 years. Remove this dead code now,
together with the now unused "pre_5_2_numa_associativity" parts.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/ppc/spapr.h |  1 -
 hw/ppc/spapr.c         | 14 --------------
 hw/ppc/spapr_numa.c    | 33 ++-------------------------------
 3 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 4db3a267bac..175aa8320c0 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -143,7 +143,6 @@ struct SpaprCapabilities {
 struct SpaprMachineClass {
     MachineClass parent_class;
 
-    bool pre_5_2_numa_associativity;
     bool pre_6_2_numa_affinity;
     SpaprResizeHpt resize_hpt_default;
     SpaprCapabilities default_caps;
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 2c203622657..635276af531 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4985,20 +4985,6 @@ static void spapr_machine_5_2_class_options(MachineClass *mc)
 
 DEFINE_SPAPR_MACHINE(5, 2);
 
-/*
- * pseries-5.1
- */
-static void spapr_machine_5_1_class_options(MachineClass *mc)
-{
-    SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
-
-    spapr_machine_5_2_class_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_1, hw_compat_5_1_len);
-    smc->pre_5_2_numa_associativity = true;
-}
-
-DEFINE_SPAPR_MACHINE(5, 1);
-
 static void spapr_machine_register_types(void)
 {
     type_register_static(&spapr_machine_info);
diff --git a/hw/ppc/spapr_numa.c b/hw/ppc/spapr_numa.c
index faa35f12275..fb47f3c7368 100644
--- a/hw/ppc/spapr_numa.c
+++ b/hw/ppc/spapr_numa.c
@@ -261,7 +261,6 @@ static void spapr_numa_FORM1_affinity_check(MachineState *machine)
 static void spapr_numa_FORM1_affinity_init(SpaprMachineState *spapr,
                                            MachineState *machine)
 {
-    SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
     int nb_numa_nodes = machine->numa_state->num_nodes;
     int i, j;
 
@@ -290,13 +289,10 @@ static void spapr_numa_FORM1_affinity_init(SpaprMachineState *spapr,
     }
 
     /*
-     * Guests pseries-5.1 and older uses zeroed associativity domains,
+     * Guests that have only one NUMA node use zeroed associativity domains,
      * i.e. no domain definition based on NUMA distance input.
-     *
-     * Same thing with guests that have only one NUMA node.
      */
-    if (smc->pre_5_2_numa_associativity ||
-        machine->numa_state->num_nodes <= 1) {
+    if (machine->numa_state->num_nodes <= 1) {
         return;
     }
 
@@ -430,7 +426,6 @@ static void spapr_numa_FORM1_write_rtas_dt(SpaprMachineState *spapr,
                                            void *fdt, int rtas)
 {
     MachineState *ms = MACHINE(spapr);
-    SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
     uint32_t refpoints[] = {
         cpu_to_be32(0x4),
         cpu_to_be32(0x3),
@@ -447,30 +442,6 @@ static void spapr_numa_FORM1_write_rtas_dt(SpaprMachineState *spapr,
         cpu_to_be32(maxdomain)
     };
 
-    if (smc->pre_5_2_numa_associativity ||
-        ms->numa_state->num_nodes <= 1) {
-        uint32_t legacy_refpoints[] = {
-            cpu_to_be32(0x4),
-            cpu_to_be32(0x4),
-            cpu_to_be32(0x2),
-        };
-        uint32_t legacy_maxdomains[] = {
-            cpu_to_be32(4),
-            cpu_to_be32(0),
-            cpu_to_be32(0),
-            cpu_to_be32(0),
-            cpu_to_be32(maxdomain ? maxdomain : 1),
-        };
-
-        G_STATIC_ASSERT(sizeof(legacy_refpoints) <= sizeof(refpoints));
-        G_STATIC_ASSERT(sizeof(legacy_maxdomains) <= sizeof(maxdomains));
-
-        nr_refpoints = 3;
-
-        memcpy(refpoints, legacy_refpoints, sizeof(legacy_refpoints));
-        memcpy(maxdomains, legacy_maxdomains, sizeof(legacy_maxdomains));
-    }
-
     _FDT(fdt_setprop(fdt, rtas, "ibm,associativity-reference-points",
                      refpoints, nr_refpoints * sizeof(refpoints[0])));
 
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine
  2026-12-01  7:55 [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines Thomas Huth
  2026-12-01  7:55 ` [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine Thomas Huth
  2026-12-01  7:55 ` [PATCH 2/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine Thomas Huth
@ 2026-12-01  7:55 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2026-12-01  7:55 UTC (permalink / raw)
  To: Harsh Prateek Bora, qemu-ppc; +Cc: Nicholas Piggin, Amit Machhiwal, qemu-devel

The pseries-5.2 machine has already been disabled automatically
since it is older than 6 years. Let's remove this dead code now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/ppc/spapr.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 635276af531..fa7b1910b16 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4974,17 +4974,6 @@ static void spapr_machine_6_0_class_options(MachineClass *mc)
 
 DEFINE_SPAPR_MACHINE(6, 0);
 
-/*
- * pseries-5.2
- */
-static void spapr_machine_5_2_class_options(MachineClass *mc)
-{
-    spapr_machine_6_0_class_options(mc);
-    compat_props_add(mc->compat_props, hw_compat_5_2, hw_compat_5_2_len);
-}
-
-DEFINE_SPAPR_MACHINE(5, 2);
-
 static void spapr_machine_register_types(void)
 {
     type_register_static(&spapr_machine_info);
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-01  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  7:55 [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines Thomas Huth
2026-12-01  7:55 ` [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine Thomas Huth
2026-12-01  7:55 ` [PATCH 2/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine Thomas Huth
2026-12-01  7:55 ` [PATCH 3/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.