From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFv9B-0005ks-Jg for qemu-devel@nongnu.org; Wed, 22 Jun 2016 23:17:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFv9A-00046e-7w for qemu-devel@nongnu.org; Wed, 22 Jun 2016 23:17:41 -0400 Date: Thu, 23 Jun 2016 12:58:55 +1000 From: David Gibson Message-ID: <20160623025855.GV17957@voom.fritz.box> References: <1466585405-3769-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wu6d9FdQ4ohoCGf7" Content-Disposition: inline In-Reply-To: <1466585405-3769-1-git-send-email-thuth@redhat.com> Subject: Re: [Qemu-devel] [PATCH] ppc: Disable huge page support if it is not available for main RAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-ppc@nongnu.org, Michael Roth , qemu-devel@nongnu.org, Alexander Graf --wu6d9FdQ4ohoCGf7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 22, 2016 at 10:50:05AM +0200, Thomas Huth wrote: > On powerpc, we must only signal huge page support to the guest if > all memory areas are capable of supporting huge pages. The commit > 2d103aae8765 ("fix hugepage support when using memory-backend-file") > already fixed the case when the user specified the mem-path property > for NUMA memory nodes instead of using the global "-mem-path" option. > However, there is one more case where it currently can go wrong. > When specifying additional memory DIMMs without using NUMA, e.g. >=20 > qemu-system-ppc64 -enable-kvm ... -m 1G,slots=3D2,maxmem=3D2G \ > -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem1 -object \ > memory-backend-file,policy=3Ddefault,mem-path=3D/...,size=3D1G,id=3Dm= em1 >=20 > the code in getrampagesize() currently assumes that huge pages > are possible since they are enabled for the mem1 object. But > since the main RAM is not backed by a huge page filesystem, > the guest Linux kernel then crashes very quickly after being > started. So in case the we've got "normal" memory without NUMA > and without the global "-mem-path" option, we must not announce > huge pages to the guest. Since this is likely a mis-configuration > by the user, also spill out a message in this case. >=20 > Signed-off-by: Thomas Huth Applied to ppc-for-2.7. --=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 --wu6d9FdQ4ohoCGf7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXa1BvAAoJEGw4ysog2bOSkJcP/36b18ZBUnEoZTHvM8rK/Mcm pBJHBayDpb1IYv95WmiuiM0/FixMxzwsN6d7TWmz+v7shvIikL57D0sbkNr2m3Pf kJ2qIecrbUgz4g2fOYblHsR2RZ3pX/WmiLmLL8Pf95rxq/gTb2n5xlVEqembJgPE dAfnKjl7OltQRmszKxLU06vyX0r5mwL4WM+Hxc0QNfsoXV9dgJBqDNvqi9r5So1C e93TJR6n178Lv/0nibxRw4+xOWiwvZ9yCUfrgKnYn0aR9QOkTGtmAzqK+SbVaY9T UkOnLojBeD+ae50WcL1FrR6gj6Qfx8ri0yVJ0uH8ZeDxWagHWrb2OJBmZAhkjWgn HGMpobsFqigDwFlcjvX1si8dXv0dpzc4Flc4tMP6Q9IU/nWi1RF92cUSYlggOjpV t2/j6KcQU92wk0uCdgZFtUEj15i+icv7WMromDBwSjZcuGGU/irBnEdR9dr3Rzwi JtzVRD/iIUghz93rwIslU+08Ue3lKpA7v6fIpoIdvs0VtLFXToRqiY5CRazwMoN+ jhhzyUh/LUi3TAelRXofvftYsOsV5vCF28hoDZD+pCoJRsjd6yAmHyGJsqoc1Myr uZ5XGXkBP5tXquVwijpfO5ysrnaizi5E8toO9gLqlWSBkTX41UuTBfaSLxMbFEPE AUsOWFe3ylvJ/G3SIZuR =MCwK -----END PGP SIGNATURE----- --wu6d9FdQ4ohoCGf7--