Received: from eggs.gnu.org ([2001:4830:134:3::10]:35366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4kI-0004y7-76 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:21:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4kD-0005kc-PN for qemu-devel@nongnu.org; Mon, 18 Jul 2016 05:21:50 -0400 References: <1468570225-14101-1-git-send-email-thuth@redhat.com> <20160715112857.275e2c85@bahia.lan> From: Thomas Huth Message-ID: <6a34fdcb-dfdf-9839-4f76-22ebb194402d@redhat.com> Date: Mon, 18 Jul 2016 11:21:41 +0200 MIME-Version: 1.0 In-Reply-To: <20160715112857.275e2c85@bahia.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [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: Greg Kurz Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au, Markus Armbruster On 15.07.2016 11:28, Greg Kurz wrote: > On Fri, 15 Jul 2016 10:10:25 +0200 > Thomas Huth wrote: > >> Commit 86b50f2e1bef ("Disable huge page support if it is not available >> for main RAM") already made sure that huge page support is not announced >> to the guest if the normal RAM of non-NUMA configurations is not backed >> 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 configured >> with huge page support (and only the memory of a DIMM is configured with >> it). When QEMU is started with the following command line for example, >> the Linux guest currently crashes because it is trying to use huge pages >> on a memory region that does not support huge pages: >> >> qemu-system-ppc64 -enable-kvm ... -m 1G,slots=4,maxmem=32G -object \ >> memory-backend-file,policy=default,mem-path=/hugepages,size=1G,id=mem-mem1 \ >> -device pc-dimm,id=dimm-mem1,memdev=mem-mem1 -smp 2 \ >> -numa node,nodeid=0 -numa node,nodeid=1 >> >> To fix this issue, we've got to make sure to disable huge page support, >> too, when there is a NUMA node that is not using a memory backend with >> huge page support. >> >> Fixes: 86b50f2e1befc33407bdfeb6f45f7b0d2439a740 > > According to http://patchwork.ozlabs.org/patch/584741/ , it is best worded > > "Broken in commit 86b50f2e1bef" Using the "Fixes:" syntax is a well-known practise with the Linux kernel (see http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=HEAD#n187), so I don't see the point why we should introduce another syntax for QEMU here. And if we do, it should be documented on http://qemu-project.org/Contribute/SubmitAPatch at least. Thomas