From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzeW7-0001ns-NF for qemu-devel@nongnu.org; Wed, 25 Jun 2014 00:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzeVz-00059g-0B for qemu-devel@nongnu.org; Wed, 25 Jun 2014 00:09:03 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:41500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzeVy-00059I-6j for qemu-devel@nongnu.org; Wed, 25 Jun 2014 00:08:54 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jun 2014 14:08:51 +1000 From: Alexey Kardashevskiy Date: Wed, 25 Jun 2014 14:08:45 +1000 Message-Id: <1403669325-17448-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf This adds a v2.1 machine to support backward compatibility for newer macines in the case if they ever be implemented. This adds a "pseries-2.1" machine as a child of the "pseries" machine and only changes visible machine name. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * removed .instance_size from the new class, the parent's .instance_size will be used in this case --- hw/ppc/spapr.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f4d464a..f572461 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1672,9 +1672,25 @@ static const TypeInfo spapr_machine_info = { }, }; +static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + + mc->name = "pseries-2.1"; + mc->desc = "pSeries Logical Partition (PAPR compliant) v2.1"; + mc->is_default = 0; +} + +static const TypeInfo spapr_machine_2_1_info = { + .name = TYPE_SPAPR_MACHINE "2.1", + .parent = TYPE_SPAPR_MACHINE, + .class_init = spapr_machine_2_1_class_init, +}; + static void spapr_machine_register_types(void) { type_register_static(&spapr_machine_info); + type_register_static(&spapr_machine_2_1_info); } type_init(spapr_machine_register_types) -- 2.0.0