From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNWPu-0001HH-NF for qemu-devel@nongnu.org; Wed, 13 Jul 2016 22:30:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNWPq-0000By-G4 for qemu-devel@nongnu.org; Wed, 13 Jul 2016 22:30:21 -0400 Date: Thu, 14 Jul 2016 12:05:42 +1000 From: David Gibson Message-ID: <20160714020542.GL14615@voom.fritz.box> References: <146840102187.900.13546085522655887765.stgit@bahia.lan> <20160713143432.01ccb05e@bahia.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4Djgzn3z2HSNnx0" Content-Disposition: inline In-Reply-To: <20160713143432.01ccb05e@bahia.lan> 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: Greg Kurz Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Bharata B Rao --T4Djgzn3z2HSNnx0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 instead = of > > compat=3Dpower7 the guest will see a POWER8 cpu. > >=20 > > While here, this patch also changes the error message to be more explic= it. > >=20 > > Signed-off-by: Greg Kurz > > --- >=20 > Of course this causes qom-set to exit as well... not sure this is > what we want. 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 > > 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, Visi= tor *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 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 --T4Djgzn3z2HSNnx0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXhvN2AAoJEGw4ysog2bOSfs8QAJzWcYHBi7dIlZtClb7VBP1h U6Vx23FyzDOBdGzLqqO59JU18ZPH3HsrLLA6TXv44gRX3NzcpENv/01ZmuHlxXEr jRjpPZeTQdPEVC45SCHGZ/+E1ecXcHf5w06t+VEoH57xaBCPn90CL8t4eFwgVy6Z Uygh7/3IsAvIZWbq59PpNCLHijlxgVLXwjHzmumLmLSwQTFHxSO3vx1HgBQIyqX9 zPcm5ziiKZdxfXmnFfn0sQqjNBGcfkIuI+ejpMZt6iQNjmXL0U/+asnHj4i7OA+R uVuA9y2R5YrAwEtO3eTLFDxRlCOuOPaGnY6y2QMYJ6+Efl7MwBlZ7+d9FyYGhhOF pMvpZEH+sElGNizdCdKJJ4p+cRbC8Xg78ERlQK9U6kSlwYE0pZAHYuqRAfx1BM/Z //q8cZK1pudp6KANnhEuM+e4vCv9w0GuIOEfX8jdsg2+Io/dYgx0EqS3kz7qDIGf 7EZlMu6mSM9nLT9bhduyq5O6PRi6H/yxpcGvc6Ss1NHNo9NpPPdCW0zyYqmRuQAs qOTfGEJTKbE0KR21VdIY/yggVMTsbqLvHx+MZfca5kKhn2hJGB4bk4bCWxGxe260 92nOjQii5wc51rCAKAIbJ6qAp3Z4B4Hhd888GHIwCK6ObYz42gyPgomUQaPKnOio 7KdVtFfJ73G6QdZEPO8/ =GWTC -----END PGP SIGNATURE----- --T4Djgzn3z2HSNnx0--