Message ID | 20241001092910.1030913-10-harshpb@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ppc/spapr: remove deprecated machines specific code | expand |
On 10/1/24 11:29, Harsh Prateek Bora wrote: > Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as > deprecated with reasons mentioned in its commit log. > Removing pseries-2.9 specific code with this patch for now. > > Suggested-by: Cédric Le Goater <clg@kaod.org> > Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Thanks, C. > --- > target/ppc/cpu.h | 1 - > hw/ppc/spapr.c | 20 -------------------- > target/ppc/cpu_init.c | 2 -- > target/ppc/machine.c | 2 +- > 4 files changed, 1 insertion(+), 24 deletions(-) > > diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h > index cab4a46fc1..74a0ab768d 100644 > --- a/target/ppc/cpu.h > +++ b/target/ppc/cpu.h > @@ -1456,7 +1456,6 @@ struct ArchCPU { > opc_handler_t *opcodes[PPC_CPU_OPCODES_LEN]; > > /* Fields related to migration compatibility hacks */ > - bool pre_2_10_migration; > bool pre_3_0_migration; > int32_t mig_slb_nr; > }; > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 97ab253fcc..84da4ece77 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -5184,26 +5184,6 @@ static void spapr_machine_2_10_class_options(MachineClass *mc) > > DEFINE_SPAPR_MACHINE(2, 10); > > -/* > - * pseries-2.9 > - */ > - > -static void spapr_machine_2_9_class_options(MachineClass *mc) > -{ > - SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc); > - static GlobalProperty compat[] = { > - { TYPE_POWERPC_CPU, "pre-2.10-migration", "on" }, > - }; > - > - spapr_machine_2_10_class_options(mc); > - compat_props_add(mc->compat_props, hw_compat_2_9, hw_compat_2_9_len); > - compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); > - smc->pre_2_10_has_unused_icps = true; > - smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED; > -}> - > -DEFINE_SPAPR_MACHINE(2, 9); > - > static void spapr_machine_register_types(void) > { > type_register_static(&spapr_machine_info); > diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c > index 7768392986..39c19e6674 100644 > --- a/target/ppc/cpu_init.c > +++ b/target/ppc/cpu_init.c > @@ -7452,8 +7452,6 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info) > } > > static Property ppc_cpu_properties[] = { > - DEFINE_PROP_BOOL("pre-2.10-migration", PowerPCCPU, pre_2_10_migration, > - false), > DEFINE_PROP_BOOL("pre-3.0-migration", PowerPCCPU, pre_3_0_migration, > false), > DEFINE_PROP_END_OF_LIST(), > diff --git a/target/ppc/machine.c b/target/ppc/machine.c > index 21bed7c7c8..47495b68b1 100644 > --- a/target/ppc/machine.c > +++ b/target/ppc/machine.c > @@ -630,7 +630,7 @@ static bool compat_needed(void *opaque) > PowerPCCPU *cpu = opaque; > > assert(!(cpu->compat_pvr && !cpu->vhyp)); > - return !cpu->pre_2_10_migration && cpu->compat_pvr != 0; > + return cpu->compat_pvr != 0; > } > > static const VMStateDescription vmstate_compat = {
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index cab4a46fc1..74a0ab768d 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1456,7 +1456,6 @@ struct ArchCPU { opc_handler_t *opcodes[PPC_CPU_OPCODES_LEN]; /* Fields related to migration compatibility hacks */ - bool pre_2_10_migration; bool pre_3_0_migration; int32_t mig_slb_nr; }; diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 97ab253fcc..84da4ece77 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -5184,26 +5184,6 @@ static void spapr_machine_2_10_class_options(MachineClass *mc) DEFINE_SPAPR_MACHINE(2, 10); -/* - * pseries-2.9 - */ - -static void spapr_machine_2_9_class_options(MachineClass *mc) -{ - SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc); - static GlobalProperty compat[] = { - { TYPE_POWERPC_CPU, "pre-2.10-migration", "on" }, - }; - - spapr_machine_2_10_class_options(mc); - compat_props_add(mc->compat_props, hw_compat_2_9, hw_compat_2_9_len); - compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); - smc->pre_2_10_has_unused_icps = true; - smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED; -} - -DEFINE_SPAPR_MACHINE(2, 9); - static void spapr_machine_register_types(void) { type_register_static(&spapr_machine_info); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 7768392986..39c19e6674 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7452,8 +7452,6 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info) } static Property ppc_cpu_properties[] = { - DEFINE_PROP_BOOL("pre-2.10-migration", PowerPCCPU, pre_2_10_migration, - false), DEFINE_PROP_BOOL("pre-3.0-migration", PowerPCCPU, pre_3_0_migration, false), DEFINE_PROP_END_OF_LIST(), diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 21bed7c7c8..47495b68b1 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -630,7 +630,7 @@ static bool compat_needed(void *opaque) PowerPCCPU *cpu = opaque; assert(!(cpu->compat_pvr && !cpu->vhyp)); - return !cpu->pre_2_10_migration && cpu->compat_pvr != 0; + return cpu->compat_pvr != 0; } static const VMStateDescription vmstate_compat = {
Commit 1392617d3576 intended to tag pseries-2.1 - 2.11 machines as deprecated with reasons mentioned in its commit log. Removing pseries-2.9 specific code with this patch for now. Suggested-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com> --- target/ppc/cpu.h | 1 - hw/ppc/spapr.c | 20 -------------------- target/ppc/cpu_init.c | 2 -- target/ppc/machine.c | 2 +- 4 files changed, 1 insertion(+), 24 deletions(-)