From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw7QJ-0001jw-CQ for qemu-devel@nongnu.org; Mon, 08 Jul 2013 05:07:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uw7QH-0003r0-91 for qemu-devel@nongnu.org; Mon, 08 Jul 2013 05:07:55 -0400 Message-ID: <51DA8023.20503@suse.de> Date: Mon, 08 Jul 2013 11:02:27 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1373118856-30171-1-git-send-email-aik@ozlabs.ru> <1373118856-30171-19-git-send-email-aik@ozlabs.ru> <20130708010917.GD2696@voom.redhat.com> In-Reply-To: <20130708010917.GD2696@voom.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 18/19] target-ppc: Enhance the CPU node labels for the guest device tree for pseries. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Alexander Graf Cc: Anthony Liguori , Alexey Kardashevskiy , qemu-devel@nongnu.org, Paul Mackerras , Prerna Saxena , qemu-ppc@nongnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 08.07.2013 03:09, schrieb David Gibson: > On Sat, Jul 06, 2013 at 11:54:15PM +1000, Alexey Kardashevskiy > wrote: >> @@ -1342,6 +1346,13 @@ static void >> ppc_spapr_init(QEMUMachineInitArgs *args)=20 >> register_savevm_live(NULL, "spapr/htab", -1, 1,=20 >> &savevm_htab_handlers, spapr); >>=20 >> + /* Ensure that cpu_model is correctly reflected for a KVM >> guest */ + if (kvm_enabled() && !strcmp(cpu_model, "host")) {=20 >> + asm ("mfpvr %0" + : "=3Dr"(pvr)); + >> cpu_model =3D ppc_cpu_alias_by_pvr(pvr); >=20 > This needs to be protected by an ifdef CONFIG_KVM or similar. If > the compiler optimization level is turned down, so that it doesn't=20 > recognize that the kvm_enabled() is always false, then this could=20 > attempt to compile the ppc asm instructions on an x86 (or > whatever) host. This hunk can be completely replaced by QOM mechanisms - just didn't get to replying yet... Andreas - --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=EF=BF=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=EF=BF=B6rffer; HRB 16746 AG N=EF= =BF=BCrnberg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJR2oAjAAoJEPou0S0+fgE/kxEP/2hvke1o/T4/h3Gl48W2+ASv 84iu5M7atndRF1L1bI6VogmQGlhE4qiAMxuLljpqriXz5lZndslMMcP3mx4skljD Y3YX9Hi37yR9KEaw0AzoQCBhhS5ZIMGjd/mtW/DqPDcN0H0IdCu340Mz/Lr+0HHy wp+ChUA8q8iYWJd6zmFmIvnaHUdbRoOHePhVlJD+GZQ2oBNu48DAaiiCdnrEJy+R ipyZJEF+QmO2RlNDgImOKfyKry6PhuWPBIjMB3qZWyuFzmkwNEcQILnOVSW/bBIl zXkEkWy3u5fES1+bYs1J4ZL6MZ+Edcd0c2BRKQ9JNUGM6mBj1S61aP8rC7u1VgLp eUfkSRYOrsvVvJJ/kpOzgWgcgYnfSYp/CUTRURHxlyIxNuvhjDllRhC4wxbF4Bk4 l6jbIDa8jAMTlbCj9EW03Fi+i+oGemkOg2g5Dxl5GnFwdPC95fE39RvSa5vB3X3q 6IgdkbicFReR1dY8JxdcJsTln6b2eMTSHvUjH56FEvDQ9Z/W7TM/qc1jpmNDX7WS bdWHcziPeAoY9Sk0aMK/LlTKmgZQM1gi5eyKIrL4ujtU3O4VKcNSihYu+Moc+oyx pEfJrkXP6cvYLwW60yxj8soBv9ssCSBU5ZqgcSK7NlfST0KxtQe4y+jwCT0LkhyS Qoat9lALzVlVlQwCWM6/ =3D2tHJ -----END PGP SIGNATURE-----