From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brgkr-0003Pb-Og for qemu-devel@nongnu.org; Wed, 05 Oct 2016 03:36:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brgkn-0001MX-In for qemu-devel@nongnu.org; Wed, 05 Oct 2016 03:36:40 -0400 References: <1475585744-28692-1-git-send-email-thuth@redhat.com> <20161005000752.GF18648@umbus.fritz.box> From: Thomas Huth Message-ID: Date: Wed, 5 Oct 2016 09:36:29 +0200 MIME-Version: 1.0 In-Reply-To: <20161005000752.GF18648@umbus.fritz.box> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mcnS6KtHnT1Q0wX1BjpOQU3JdqxUIbO16" Subject: Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Use POWER8 by default for the pseries-2.8 machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mcnS6KtHnT1Q0wX1BjpOQU3JdqxUIbO16 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05.10.2016 02:07, David Gibson wrote: > On Tue, Oct 04, 2016 at 02:55:44PM +0200, Thomas Huth wrote: >> A couple of distributors are compiling their distributions >> with "-mcpu=3Dpower8" for ppc64le these days, so the user sooner >> or later runs into a crash there when not explicitely specifying >> the "-cpu POWER8" option to QEMU. Due to this reason, the linux-user >> target already switched to POWER8 by default a while ago (see commit >> de3f1b98410e0d5b406a0df3a48547b559d18602). Since the softmmu target >> of course has the same problem, we should switch there to POWER8 >> by default for the newer machine types, too. >> >> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=3D1357808 >> Signed-off-by: Thomas Huth >=20 > Sounds good, one detail.. >=20 >> --- >> Note: This patch should be applied on top of David's ppc-for-2.8 >> tree, since the pseries-2.8 machine has just been added there >> recently. >> >> hw/ppc/spapr.c | 11 ++++++++++- >> include/hw/ppc/spapr.h | 1 + >> 2 files changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c >> index 63b6a0d..799bcff 100644 >> --- a/hw/ppc/spapr.c >> +++ b/hw/ppc/spapr.c >> @@ -1775,7 +1775,13 @@ static void ppc_spapr_init(MachineState *machin= e) >> =20 >> /* init CPUs */ >> if (machine->cpu_model =3D=3D NULL) { >> - machine->cpu_model =3D kvm_enabled() ? "host" : "POWER7"; >> + if (kvm_enabled()) { >> + machine->cpu_model =3D "host"; >> + } else if (smc->tcg_default_cpu) { >> + machine->cpu_model =3D smc->tcg_default_cpu; >> + } else { >> + machine->cpu_model =3D "POWER8"; >> + } >=20 > You can avoid the last if branch if you initialize tcg_default_cpu to > POWER8 in spapr_machine_class_init(). You're right, that sounds better. I'll send a v2 ... Thomas --mcnS6KtHnT1Q0wX1BjpOQU3JdqxUIbO16 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJX9K2BAAoJEC7Z13T+cC21BwcQAK20YphEeWtI3dz/DBJvHDOu c2by41GDfMYeku2lXMWB57Hx7HiGBBh8/M21TRcrAi48H73mKdqKfr4UXc10R8Tf knsnlY3wbbzd4tNvNb8EBnz4xEGqCTM5oky0vOqxznp+K7Pf6us0t3X7TCt/PnMW OAi1vkNWXNwTRgb4Qfi2hZfsvBGjygde5hm1ubtPVc2UR8DoE4YlWe4ZxuKGuS5b hnfltkE7xlf9FwkwaNG8C8OK+AR4HJlzcRfKmbtWICd8bfy7zRaRNEjIsM5sYBjw t4G18zwwZ3V5egoo8IBw9cSnSPi2LSF8T1qHFtqO/oSlzlRt3eOEZjMhjgOacr3b WBeWSlL1+CPKifkrqV30RG65PP5WmUcJn+Ut5V4FdyiKi/XApkz0gVeF+9sEAz3G IZoIbJqpwPiplKJWkMzERPNNgk4SobSR1Sb69ZMqXiEiAZY87+KoTx5eZ1H2CHP2 i14gnQKGLxaHn/i50d9zgvLdqyXQHzvHYGlbIDGov86nHeuerVlmTuA6SzsLTpxt gd76d1ZFb2LtUea/4a7hCJFIBfc9LS7JF4XyY8NPMrEUOwZUDN8m7TPXqYhYD+v0 IP+PIVpfBAnhr9yatVetd0CcRx1P7oVANSuKh/F35ggk3gJoXlZvUpqYhzHMi1eg xZhCLTsZD8I+3jnSPYpW =spst -----END PGP SIGNATURE----- --mcnS6KtHnT1Q0wX1BjpOQU3JdqxUIbO16--