From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmLfI-0007Jl-U3 for qemu-devel@nongnu.org; Tue, 20 Sep 2016 10:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmLfE-0007bL-OO for qemu-devel@nongnu.org; Tue, 20 Sep 2016 10:04:52 -0400 Received: from 18.mo1.mail-out.ovh.net ([46.105.35.72]:37683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmLfE-0007aZ-G1 for qemu-devel@nongnu.org; Tue, 20 Sep 2016 10:04:48 -0400 Received: from player758.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 90DF672DF for ; Tue, 20 Sep 2016 16:04:47 +0200 (CEST) References: <75632046-c527-8d5f-6ac0-a40c28239579@redhat.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <71298df5-d5de-e09f-5abd-9a8dbeefb16c@kaod.org> Date: Tue, 20 Sep 2016 16:04:43 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] 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 On 09/20/2016 02:24 PM, C=C3=A9dric Le Goater wrote: > On 09/20/2016 01:44 PM, Thomas Huth wrote: >> Hi, >> >> when I try to run my guest in KVM-PR mode, current QEMU refuses to sta= rt: >> >> $ sudo qemu-system-ppc64 -M pseries,accel=3Dkvm,kvm-type=3DPR \ >> -nographic -vga none -cpu POWER8 >> qemu: fatal: Unknown MMU model 851972 >> >> ... followed by a useless register dump. I've bisected the issue, and = it >> seems like the problem has been introduced by this commit here: >> >> commit 4322e8ced5aaac7191958f09622d199fe61e2d87 >> ppc: Fix 64K pages support in full emulation >> >> Seems like KVM PR is using the "degraded" ISA variants (without the 1T= B >> segments), but the new POWERPC_MMU_64K flag has not been added to thos= e. >> Has this been done on purpose, or was this just by accident? >=20 > The "degraded" architecture support has some history behind it : >=20 > commit 126a79300971 added it > commit aa4bb5875231 removed it. > commit ba3ecda05e93 readded it. > commit 4322e8ced5aa forgot about it again >=20 >> I can make KVM PR working again with the following patch: >=20 > I think this is correct. Let's wait for Ben to chime in :) So I confirm the bug and the fix.=20 There are other issues after in the guest (kernel crashing). But I think these are related to TM which is not supported in KVM-PR. I am not sure where we are on that point. 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, >> }; >> >> However, not sure whether this is the right fix ... C=C3=A9dric, Ben, = any ideas? >=20 >=20 >=20 >=20