From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmeZy-0006Vw-9T for qemu-devel@nongnu.org; Wed, 21 Sep 2016 06:16:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmeZs-0006QU-71 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 06:16:37 -0400 Date: Wed, 21 Sep 2016 20:14:03 +1000 From: David Gibson Message-ID: <20160921101403.GE1809@umbus.fritz.box> References: <1474450935-30812-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ryJZkp9/svQ58syV" Content-Disposition: inline In-Reply-To: <1474450935-30812-1-git-send-email-thuth@redhat.com> Subject: Re: [Qemu-devel] [PATCH] ppc/kvm: Mark 64kB page size support as disabled if not available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org, =?iso-8859-1?Q?C=E9dric?= Le Goater --ryJZkp9/svQ58syV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2016 at 11:42:15AM +0200, Thomas Huth wrote: > QEMU currently refuses to start with KVM-PR and only prints out >=20 > qemu: fatal: Unknown MMU model 851972 >=20 > when being started there. This is because commit 4322e8ced5aaac719 > ("ppc: Fix 64K pages support in full emulation") introduced a new > POWERPC_MMU_64K bit to indicate support for this page size, but > it never gets cleared on KVM-PR if the host kernel does not support > this. Thus we've got to turn off this bit in the mmu_model for KVM-PR. >=20 > Signed-off-by: Thomas Huth Applied to ppc-for-2.8, thanks. > --- > target-ppc/kvm.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > index dcb68b9..6bdc804 100644 > --- a/target-ppc/kvm.c > +++ b/target-ppc/kvm.c > @@ -427,6 +427,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu) > CPUPPCState *env =3D &cpu->env; > long rampagesize; > int iq, ik, jq, jk; > + bool has_64k_pages =3D false; > =20 > /* We only handle page sizes for 64-bit server guests for now */ > if (!(env->mmu_model & POWERPC_MMU_64)) { > @@ -470,6 +471,9 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu) > ksps->enc[jk].page_shift)) { > continue; > } > + if (ksps->enc[jk].page_shift =3D=3D 16) { > + has_64k_pages =3D true; > + } > qsps->enc[jq].page_shift =3D ksps->enc[jk].page_shift; > qsps->enc[jq].pte_enc =3D ksps->enc[jk].pte_enc; > if (++jq >=3D PPC_PAGE_SIZES_MAX_SZ) { > @@ -484,6 +488,9 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu) > if (!(smmu_info.flags & KVM_PPC_1T_SEGMENTS)) { > env->mmu_model &=3D ~POWERPC_MMU_1TSEG; > } > + if (!has_64k_pages) { > + env->mmu_model &=3D ~POWERPC_MMU_64K; > + } > } > #else /* defined (TARGET_PPC64) */ > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --ryJZkp9/svQ58syV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4l1pAAoJEGw4ysog2bOSfhcP/RccW0sDVSdDSzoYpUmv9VIJ CS45Jm+ICsbCYobGZ176vlEaaWL7igNDEXhKi7Hb1y9pLNRkq4JAKOmtJ5KpQ0YL S+jmBRPLj4ydBsc0fjAxVZeL2Xneng/lDZvbc6OK48YgUZ3JWfHNUhcwjC8+Nxb9 u60OAHlz+LeInj5tNeAT6faiyd+k3U6YCmJEcTuh7HYuveBlW/F242OnEloj22hO VYkOsjroQPYHmr6x80LoK6HjifVOqhSU0ab9vdT24+auzd1EZw2TuribAquFhoyr JjYi6+SNl26sEnA8Z9LIiCoZyKadtMKqO6/JC//c+6HI7LFjChw2W1k5K1b3ql2j jF5ymH8euRcAVYKMEZMRj5svLOWYJLS6QUhDb0LDJrDIRy1uKQit9GsP3JOke/8/ ytyp0YElmfSbax2sa4Zlm4iqFn+fN9+u4byFC5ZTq1oa3kwo+SP2lyk2onbRJdSd QsW/htCxXNAdoyu1zyewMX6bfDCfm/EUt5hvX2id+ZYu2emfaPPqnzKPlffr0Gsv pLeNWsodCT13K8gqX0dqH1ui7eO2Dxs7KR6fcTUb0bpP3szg8zB/aTiZc70rouHq lTQnubFMG3UNs1DG3qqJIv467jFgUvux+U1bAtxfNVm+OOQYnoL6Q9WA8yDKnE2L NXk1sz8rrijrpGiM4Xmi =/0pU -----END PGP SIGNATURE----- --ryJZkp9/svQ58syV--