From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzSSp-0003MM-Od for qemu-devel@nongnu.org; Tue, 24 Jun 2014 11:16:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzSSj-00018r-Hd for qemu-devel@nongnu.org; Tue, 24 Jun 2014 11:16:51 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:63048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzSSj-00018d-CD for qemu-devel@nongnu.org; Tue, 24 Jun 2014 11:16:45 -0400 Received: by mail-pd0-f179.google.com with SMTP id w10so363694pde.24 for ; Tue, 24 Jun 2014 08:16:44 -0700 (PDT) Message-ID: <53A99657.3080405@ozlabs.ru> Date: Wed, 25 Jun 2014 01:16:39 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1403622033-3748-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1403622033-3748-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] 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: qemu-ppc@nongnu.org, Alexander Graf On 06/25/2014 01:00 AM, Alexey Kardashevskiy wrote: > 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 Agrh. Drop it. For some reason unknown there is SPAPRMachine struct instead of expected sPAPRMachineState struct. I'll change this and repost everything in a patchset. > --- > > It seems to be everyone's consensus that we want some versioned > pseries machine so here it is :) > > --- > hw/ppc/spapr.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index f4d464a..ab8f1ba 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1672,9 +1672,26 @@ 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, > + .instance_size = sizeof(SPAPRMachine), > + .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) > -- Alexey