Received: from eggs.gnu.org ([2001:4830:134:3::10]:35999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4pL-00029W-Mh for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4pG-0006Or-LK for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:27:03 -0400 Received: from 5.mo178.mail-out.ovh.net ([46.105.51.53]:39115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4pG-0006Oc-Bb for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:26:58 -0400 Received: from player169.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 379DB101036A for ; Mon, 18 Jul 2016 11:26:57 +0200 (CEST) Date: Mon, 18 Jul 2016 11:26:50 +0200 From: Greg Kurz Message-ID: <20160718112650.4f831dd3@bahia.lan> In-Reply-To: <9c8dae5e-d2bd-fa21-f12e-31fd21ca97bc@redhat.com> References: <1468570225-14101-1-git-send-email-thuth@redhat.com> <20160718005236.GD16769@voom.fritz.box> <20160718105944.3908f7ca@bahia.lan> <9c8dae5e-d2bd-fa21-f12e-31fd21ca97bc@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/2_cisWtdNqU4+xjh=rPM1N7"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Yet another fix for the huge page support detection mechanism List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: David Gibson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org --Sig_/2_cisWtdNqU4+xjh=rPM1N7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 18 Jul 2016 11:04:39 +0200 Thomas Huth wrote: > On 18.07.2016 10:59, Greg Kurz wrote: > > On Mon, 18 Jul 2016 10:52:36 +1000 > > David Gibson wrote: > > =20 > >> On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: =20 > >>> Commit 86b50f2e1bef ("Disable huge page support if it is not available > >>> for main RAM") already made sure that huge page support is not announ= ced > >>> to the guest if the normal RAM of non-NUMA configurations is not back= ed > >>> by a huge page filesystem. However, there is one more case that can go > >>> wrong: NUMA is enabled, but the RAM of the NUMA nodes are not configu= red > >>> with huge page support (and only the memory of a DIMM is configured w= ith > >>> it). When QEMU is started with the following command line for example, > >>> the Linux guest currently crashes because it is trying to use huge pa= ges > >>> on a memory region that does not support huge pages: > >>> > >>> qemu-system-ppc64 -enable-kvm ... -m 1G,slots=3D4,maxmem=3D32G -obje= ct \ > >>> memory-backend-file,policy=3Ddefault,mem-path=3D/hugepages,size=3D= 1G,id=3Dmem-mem1 \ > >>> -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem-mem1 -smp 2 \ > >>> -numa node,nodeid=3D0 -numa node,nodeid=3D1 > >>> > >>> To fix this issue, we've got to make sure to disable huge page suppor= t, > >>> too, when there is a NUMA node that is not using a memory backend with > >>> huge page support. > >>> > >>> Fixes: 86b50f2e1befc33407bdfeb6f45f7b0d2439a740 > >>> Signed-off-by: Thomas Huth > >>> --- > >>> target-ppc/kvm.c | 10 +++++++--- > >>> 1 file changed, 7 insertions(+), 3 deletions(-) =20 > >> > >> Applied to ppc-for-2.7, thanks. > >> =20 > >=20 > > It looks like my replies to this patch were ignored... no big deal thou= gh :) =20 >=20 > I'll try to come up with an additional patch that fixes the remaining > problem that you've found... Meanwhile, did you find out why you get > that assertion that I was not able to recreate? Could you maybe post the > exact command line to trigger that assertion? >=20 I hit the assertion when I specify pc-dimm devices on the command line: qemu-system-ppc64 -enable-kvm ... -m 2G,slots=3D4,maxmem=3D32G \ -object memory-backend-file,policy=3Ddefault,mem-path=3D/mnt/kvm_hugepage,= size=3D1G,id=3Dmem-mem1 \ -device pc-dimm,id=3Ddimm-mem1,memdev=3Dmem-mem1 \ -object memory-backend-file,policy=3Ddefault,mem-path=3D/mnt,size=3D1G,id= =3Dmem-mem2 \ -device pc-dimm,id=3Ddimm-mem2,memdev=3Dmem-mem2 \ -smp 2 -numa node,nodeid=3D0,memdev=3Dmem-mem1 \ -numa node,nodeid=3D1,memdev=3Dmem-mem2 > Thomas >=20 >=20 --Sig_/2_cisWtdNqU4+xjh=rPM1N7 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAleMoNoACgkQAvw66wEB28JDqwCgjQDxGByqrb/JA2jDC6uPYvap 3IkAn2T77a+6LyivshrIm3VCj8PZecKS =Egx8 -----END PGP SIGNATURE----- --Sig_/2_cisWtdNqU4+xjh=rPM1N7--