From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNYuR-0000DD-Hq for qemu-devel@nongnu.org; Thu, 14 Jul 2016 01:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNYuL-0003vD-NV for qemu-devel@nongnu.org; Thu, 14 Jul 2016 01:10:02 -0400 Received: from 4.mo178.mail-out.ovh.net ([46.105.49.171]:60931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNYuL-0003v2-Hh for qemu-devel@nongnu.org; Thu, 14 Jul 2016 01:09:57 -0400 Received: from player169.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 2FFE6FFCE6A for ; Thu, 14 Jul 2016 07:09:56 +0200 (CEST) Date: Thu, 14 Jul 2016 07:09:50 +0200 From: Greg Kurz Message-ID: <20160714070950.52ef47ed@bahia.lan> In-Reply-To: <20160714020542.GL14615@voom.fritz.box> References: <146840102187.900.13546085522655887765.stgit@bahia.lan> <20160713143432.01ccb05e@bahia.lan> <20160714020542.GL14615@voom.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/7q6FNUxovszt8M03iqsJVzQ"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: exit if compat mode is unknown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Bharata B Rao --Sig_/7q6FNUxovszt8M03iqsJVzQ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 14 Jul 2016 12:05:42 +1000 David Gibson wrote: > On Wed, Jul 13, 2016 at 02:34:32PM +0200, Greg Kurz wrote: > > On Wed, 13 Jul 2016 11:10:21 +0200 > > Greg Kurz wrote: > > =20 > > > Now that properties are set with -global, if we pass a bogus value for > > > compat mode, a warning is printed and the property is simply ignored. > > > For example, if the host is POWER8 and we pass compat=3DPOWER7 instea= d of > > > compat=3Dpower7 the guest will see a POWER8 cpu. > > >=20 > > > While here, this patch also changes the error message to be more expl= icit. > > >=20 > > > Signed-off-by: Greg Kurz > > > --- =20 > >=20 > > Of course this causes qom-set to exit as well... not sure this is > > what we want. =20 >=20 > Yeah, that seems wrong. If I'm reading this right this is obsoleted > by your later generic patch adding an &error_fatal to the generic > code, yes? >=20 Yes it is indeed. > > =20 > > > target-ppc/translate_init.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > >=20 > > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > > > index 8f257fb74aa7..55688db9c9db 100644 > > > --- a/target-ppc/translate_init.c > > > +++ b/target-ppc/translate_init.c > > > @@ -8475,7 +8475,11 @@ static void powerpc_set_compat(Object *obj, Vi= sitor *v, const char *name, > > > } else if (strcmp(value, "power8") =3D=3D 0) { > > > *max_compat =3D CPU_POWERPC_LOGICAL_2_07; > > > } else { > > > - error_setg(errp, "Invalid compatibility mode \"%s\"", value); > > > + /* This is called from -global, which does not exit on error= . Since we > > > + * don't want to start with a wrong compat mode, we exit now. > > > + */ > > > + error_report("PPC does not support compatibility mode \"%s\"= ", value); > > > + exit(1); > > > } > > > =20 > > > g_free(value); > > >=20 > > > =20 > > =20 >=20 --Sig_/7q6FNUxovszt8M03iqsJVzQ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAleHHp8ACgkQAvw66wEB28IxsQCggvyHOSVXNB4jiHK95F5Wvmo2 8EUAoJSoSaXPKhGfQUIHGmeFLPkzxlGo =Tdi1 -----END PGP SIGNATURE----- --Sig_/7q6FNUxovszt8M03iqsJVzQ--