From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHYJg-0003Oz-FV for qemu-devel@nongnu.org; Wed, 13 Aug 2014 09:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHYJa-0005so-2V for qemu-devel@nongnu.org; Wed, 13 Aug 2014 09:10:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42302 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHYJZ-0005pT-Sp for qemu-devel@nongnu.org; Wed, 13 Aug 2014 09:10:06 -0400 Message-ID: <53EB63AA.4050902@suse.de> Date: Wed, 13 Aug 2014 15:10:02 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1407892991-15752-1-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1407892991-15752-1-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] spapr: Make machine naming conventions closer to those for PC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , aik@ozlabs.ru, agraf@suse.de Cc: qemu-devel@nongnu.org, Markus Armbruster Hi, Am 13.08.2014 03:23, schrieb David Gibson: > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes t= o > represent the machine type as it appeared to the guest in different qem= u > versions. This allows for safe migration of guests between current and > future qemu versions. >=20 > In PC, however, the default plain "pc" machine type is just an alias fo= r > the most recent versioned machine type. In sPAPR at the moment, it nam= es > the base machine class from which the versioned types are derived. >=20 > The PC approach is preferable; it makes it clearer which explicit versi= on > is the current one. Additionally updating the "current" machine as the > base class makes it even more likely than otherwise to incorrectly alte= r > the versioned machines' behaviour when updating the current machine. >=20 > Therefore this patch changes sPAPR to the PC approach - the base class > becomes abstract, and plain "pseries" becomes an alias for the most > recent versioned machine class. >=20 > Signed-off-by: David Gibson > --- > hw/ppc/spapr.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index d01978f..2785dbc 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1583,7 +1583,6 @@ static void spapr_machine_class_init(ObjectClass = *oc, void *data) > =20 > mc->name =3D "pseries"; > mc->desc =3D "pSeries Logical Partition (PAPR compliant)"; > - mc->is_default =3D 1; > mc->init =3D ppc_spapr_init; > mc->reset =3D ppc_spapr_reset; > mc->block_default_type =3D IF_SCSI; > @@ -1598,6 +1597,7 @@ static void spapr_machine_class_init(ObjectClass = *oc, void *data) > static const TypeInfo spapr_machine_info =3D { > .name =3D TYPE_SPAPR_MACHINE, > .parent =3D TYPE_MACHINE, > + .abstract =3D true, > .instance_size =3D sizeof(sPAPRMachineState), > .instance_init =3D spapr_machine_initfn, > .class_init =3D spapr_machine_class_init, > @@ -1613,7 +1613,8 @@ static void spapr_machine_2_1_class_init(ObjectCl= ass *oc, void *data) > =20 > mc->name =3D "pseries-2.1"; > mc->desc =3D "pSeries Logical Partition (PAPR compliant) v2.1"; > - mc->is_default =3D 0; > + mc->alias =3D "pseries"; > + mc->is_default =3D 1; > } > =20 > static const TypeInfo spapr_machine_2_1_info =3D { This looks wrong to me. With 2.1 released, the default should be a 2.2 machine, not 2.1. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg