Add a new pseries-2.6 machine class version to make sure we can keep the old types compatible to previous versions of QEMU in later patches.
Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/ppc/spapr.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6bfb908..10b7c35 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2439,8 +2439,6 @@ static void spapr_machine_2_5_class_init(ObjectClass *oc, void *data) mc->name = "pseries-2.5"; mc->desc = "pSeries Logical Partition (PAPR compliant) v2.5"; - mc->alias = "pseries"; - mc->is_default = 1; smc->dr_lmb_enabled = true; } @@ -2450,6 +2448,24 @@ static const TypeInfo spapr_machine_2_5_info = { .class_init = spapr_machine_2_5_class_init, }; +static void spapr_machine_2_6_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(oc); + + mc->name = "pseries-2.6"; + mc->desc = "pSeries Logical Partition (PAPR compliant) v2.6"; + mc->alias = "pseries"; + mc->is_default = 1; + smc->dr_lmb_enabled = true; +} + +static const TypeInfo spapr_machine_2_6_info = { + .name = MACHINE_TYPE_NAME("pseries-2.6"), + .parent = TYPE_SPAPR_MACHINE, + .class_init = spapr_machine_2_6_class_init, +}; + static void spapr_machine_register_types(void) { type_register_static(&spapr_machine_info); @@ -2458,6 +2474,7 @@ static void spapr_machine_register_types(void) type_register_static(&spapr_machine_2_3_info); type_register_static(&spapr_machine_2_4_info); type_register_static(&spapr_machine_2_5_info); + type_register_static(&spapr_machine_2_6_info); } type_init(spapr_machine_register_types) -- 1.8.3.1