From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2FOG-0007y3-HO for qemu-devel@nongnu.org; Fri, 27 Nov 2015 04:32:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2FOF-0006p9-9a for qemu-devel@nongnu.org; Fri, 27 Nov 2015 04:32:28 -0500 From: Thomas Huth Date: Fri, 27 Nov 2015 10:32:19 +0100 Message-Id: <1448616740-27332-2-git-send-email-thuth@redhat.com> In-Reply-To: <1448616740-27332-1-git-send-email-thuth@redhat.com> References: <1448616740-27332-1-git-send-email-thuth@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr: Create pseries-2.6 machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org, David Gibson Cc: Alexey Kardashevskiy , Alexander Graf , Nikunj A Dadhania , qemu-devel@nongnu.org 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 --- 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