From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmxS9-0005d1-0L for qemu-devel@nongnu.org; Thu, 22 Sep 2016 02:25:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmxS4-0002Uc-O6 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 02:25:47 -0400 Date: Thu, 22 Sep 2016 08:25:38 +0200 From: Thomas Huth Message-ID: <20160922082538.3d1c5895@thh440s> In-Reply-To: <1474407935.2857.87.camel@kernel.crashing.org> References: <75632046-c527-8d5f-6ac0-a40c28239579@redhat.com> <1474407935.2857.87.camel@kernel.crashing.org> MIME-Version: 1.0 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: Benjamin Herrenschmidt Cc: qemu-ppc@nongnu.org, QEMU Developers , =?UTF-8?B?Q8OpZHJpYw==?= Le Goater , David Gibson On Wed, 21 Sep 2016 07:45:35 +1000 Benjamin Herrenschmidt wrote: > On Tue, 2016-09-20 at 13:44 +0200, Thomas Huth wrote: > >=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? > > I can make KVM PR working again with the following patch: > >=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 { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | POWERPC_MMU_AMR | 0x00000003, > > =C2=A0=C2=A0=C2=A0=C2=A0 /* Architecture 2.06 "degraded" (no 1T segment= s)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > > =C2=A0=C2=A0=C2=A0=C2=A0 POWERPC_MMU_2_06a=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =3D POWERPC_MMU_64 | POWERPC_MMU_AMR > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 | POWERPC_MMU_64K > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 0x00000003, > > =C2=A0=C2=A0=C2=A0=C2=A0 /* Architecture 2.07 variant=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 */ > > =C2=A0=C2=A0=C2=A0=C2=A0 POWERPC_MMU_2_07=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D POWERPC_MMU_64 | POWERPC_MMU_1TSEG > > @@ -88,6 +89,7 @@ enum powerpc_mmu_t { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | POWERPC_MMU_AMR | 0x00000004, > > =C2=A0=C2=A0=C2=A0=C2=A0 /* Architecture 2.07 "degraded" (no 1T segment= s)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > > =C2=A0=C2=A0=C2=A0=C2=A0 POWERPC_MMU_2_07a=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =3D POWERPC_MMU_64 | POWERPC_MMU_AMR > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 | POWERPC_MMU_64K > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 0x00000004, > > =C2=A0}; > >=20 > > However, not sure whether this is the right fix ... C=C3=A9dric, Ben, a= ny > > ideas? >=20 > Oh I thought I had removed the degraded variants ... Definitely looks > like an accident. I *think* PR KVM supports 64K pages, no ? If not, > then we shouldn't enable the flag.. somebody needs to check the kernel. Yes, it supports 64k pages - but only on POWER8, not on POWER8E or POWER8NVL yet. I've posted a patch to fix this here: https://patchwork.ozlabs.org/patch/672841/ Thomas