From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHo0Q-00073o-6O for qemu-devel@nongnu.org; Thu, 14 Aug 2014 01:55:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHo0M-0001B3-5m for qemu-devel@nongnu.org; Thu, 14 Aug 2014 01:55:22 -0400 Received: from ozlabs.org ([103.22.144.67]:49462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHo0L-0001AB-RG for qemu-devel@nongnu.org; Thu, 14 Aug 2014 01:55:18 -0400 Date: Thu, 14 Aug 2014 15:55:34 +1000 From: David Gibson Message-ID: <20140814055534.GJ7628@voom.redhat.com> References: <1407892991-15752-1-git-send-email-david@gibson.dropbear.id.au> <53EB63AA.4050902@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JsihDCElWRmQcbOr" Content-Disposition: inline In-Reply-To: <53EB63AA.4050902@suse.de> 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: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: aik@ozlabs.ru, Markus Armbruster , agraf@suse.de, qemu-devel@nongnu.org --JsihDCElWRmQcbOr Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 13, 2014 at 03:10:02PM +0200, Andreas F=E4rber wrote: > Hi, >=20 > Am 13.08.2014 03:23, schrieb David Gibson: > > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to > > represent the machine type as it appeared to the guest in different qemu > > 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 for > > 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 alter > > 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 { >=20 > This looks wrong to me. With 2.1 released, the default should be a 2.2 > machine, not 2.1. Ah, yes, I guess so. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --JsihDCElWRmQcbOr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT7E9WAAoJEGw4ysog2bOSuyQP/0gJSfqLhrxs8efIb4AI3dW7 Dz9/CNTpaYEYhKD/gn7up55zyf0/aKDVpyMc/2GSP4Huexh7Tf0fgYTq+NasXQWR FVvOQJP+UR/HvhdpL7J+idKkbdF6+Wfp4MOSA+tMeSJYhCfKOTNmnYL5LeYHiYuA jbXckHrI4iM4PcSszQo4vM2NXSxytDNqeyf0j0j7Z9jq8bfZzSQ6UNvDqtV7Zofk AImVvx/2fN6Je1cSY+2WUEtlx/aiS8d375rBEHk5KObF5nDWPQ+HLzn+SQvsLfbs CnmalZyoHmXR55cnRQ/qQHfu35llkv6qZ2Rzefq89BCyUwm/IBOTutxy4nk6rGYt J9M/LCREKC6qvWbJxQr+IysJVr9tGVOIGavStw2t0L1LAvmrfRCkxSut/5Bv2rWD WdIh15F24Oo6QQ8Qf4Wdrr5Hg5FSxE4iA/eW+LzoWop2SF6I12X1kIFaTQa54Tjn 00VKMO0Sff7Bx+whVbQZNHmPZrc8W/8rR0/4/9UgMQdxgIyTrSRsLfRTQTgYfDL+ an4A5/lbdkrfVdViNoAcz9KCCZaRV6dYsLJxU/r3V24KYsnloInmUUlTCyu2qugg i/1/mZ/hQl3/IhJbhIU7vsoCxNQwC5/jarVZojgPd1TnaBqfX0g/brgjQdTGv7IW MG7lGtMheLJ8itoRyuDE =k1MJ -----END PGP SIGNATURE----- --JsihDCElWRmQcbOr--