From: Thomas Huth <thuth@redhat.com>
To: Harsh Prateek Bora <harshpb@linux.ibm.com>, qemu-ppc@nongnu.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Amit Machhiwal <amachhiw@linux.ibm.com>,
qemu-devel@nongnu.org
Subject: [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine
Date: Tue, 1 Dec 2026 08:55:34 +0100 [thread overview]
Message-ID: <20261201075536.40736-2-thuth@redhat.com> (raw)
In-Reply-To: <20261201075536.40736-1-thuth@redhat.com>
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
next prev parent reply other threads:[~2026-12-01 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201075536.40736-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=amachhiw@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.