Received: from eggs.gnu.org ([2001:4830:134:3::10]:42867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmK68-0002TL-Th for qemu-devel@nongnu.org; Tue, 20 Sep 2016 08:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmK65-0004z2-4G for qemu-devel@nongnu.org; Tue, 20 Sep 2016 08:24:27 -0400 Received: from 11.mo1.mail-out.ovh.net ([188.165.48.29]:44186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmK64-0004yU-UP for qemu-devel@nongnu.org; Tue, 20 Sep 2016 08:24:25 -0400 Received: from player758.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 0BC615B32 for ; Tue, 20 Sep 2016 14:24:23 +0200 (CEST) References: <75632046-c527-8d5f-6ac0-a40c28239579@redhat.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: Date: Tue, 20 Sep 2016 14:24:18 +0200 MIME-Version: 1.0 In-Reply-To: <75632046-c527-8d5f-6ac0-a40c28239579@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] KVM-PR is broken with current QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-ppc@nongnu.org Cc: QEMU Developers , David Gibson , Benjamin Herrenschmidt On 09/20/2016 01:44 PM, Thomas Huth wrote: > Hi, >=20 > when I try to run my guest in KVM-PR mode, current QEMU refuses to star= t: >=20 > $ sudo qemu-system-ppc64 -M pseries,accel=3Dkvm,kvm-type=3DPR \ > -nographic -vga none -cpu POWER8 > qemu: fatal: Unknown MMU model 851972 >=20 > ... followed by a useless register dump. I've bisected the issue, and i= t > seems like the problem has been introduced by this commit here: >=20 > commit 4322e8ced5aaac7191958f09622d199fe61e2d87 > ppc: Fix 64K pages support in full emulation >=20 > Seems like KVM PR is using the "degraded" ISA variants (without the 1TB > segments), but the new POWERPC_MMU_64K flag has not been added to those= . > Has this been done on purpose, or was this just by accident? The "degraded" architecture support has some history behind it : commit 126a79300971 added it commit aa4bb5875231 removed it. commit ba3ecda05e93 readded it. commit 4322e8ced5aa forgot about it again > I can make KVM PR working again with the following patch: I think this is correct. Let's wait for Ben to chime in :) Thanks, C. =20 > diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h > index 2864105..36694cb 100644 > --- a/target-ppc/cpu-qom.h > +++ b/target-ppc/cpu-qom.h > @@ -81,6 +81,7 @@ enum powerpc_mmu_t { > | POWERPC_MMU_AMR | 0x00000003, > /* Architecture 2.06 "degraded" (no 1T segments) */ > POWERPC_MMU_2_06a =3D POWERPC_MMU_64 | POWERPC_MMU_AMR > + | POWERPC_MMU_64K > | 0x00000003, > /* Architecture 2.07 variant */ > POWERPC_MMU_2_07 =3D POWERPC_MMU_64 | POWERPC_MMU_1TSEG > @@ -88,6 +89,7 @@ enum powerpc_mmu_t { > | POWERPC_MMU_AMR | 0x00000004, > /* Architecture 2.07 "degraded" (no 1T segments) */ > POWERPC_MMU_2_07a =3D POWERPC_MMU_64 | POWERPC_MMU_AMR > + | POWERPC_MMU_64K > | 0x00000004, > }; >=20 > However, not sure whether this is the right fix ... C=C3=A9dric, Ben, a= ny ideas?