From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrOXN-000537-AW for qemu-devel@nongnu.org; Thu, 11 Aug 2011 02:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrOXJ-0007Cf-DO for qemu-devel@nongnu.org; Thu, 11 Aug 2011 02:14:37 -0400 Received: from ozlabs.org ([203.10.76.45]:53965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrOXI-0007CT-SH for qemu-devel@nongnu.org; Thu, 11 Aug 2011 02:14:33 -0400 Date: Thu, 11 Aug 2011 16:09:59 +1000 From: David Gibson Message-ID: <20110811060959.GQ6342@yookeroo.fritz.box> References: <1312516970-26606-1-git-send-email-david@gibson.dropbear.id.au> <4E3B8ACA.7080104@web.de> <20110805153053.GA15083@amt.cnet> <20110808060328.GB20120@yookeroo.fritz.box> <4E3F9D29.2000708@redhat.com> <20110810051002.GM23511@yookeroo.fritz.box> <4E4248D0.6070209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E4248D0.6070209@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Permit -mem-path without sync mmu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: kvm , Marcelo Tosatti , qemu-devel@nongnu.org, agraf@suse.de, Paul Mackerras , Jan Kiszka On Wed, Aug 10, 2011 at 12:01:04PM +0300, Avi Kivity wrote: > On 08/10/2011 08:10 AM, David Gibson wrote: > >On Mon, Aug 08, 2011 at 11:24:09AM +0300, Avi Kivity wrote: > >> On 08/08/2011 09:03 AM, David Gibson wrote: [snip] > >This would seem to be a genuine bug in the hugepage code, which has > >just been hidden by SYNC_MMU. It should be quite easy to fix - the > >mapping is only stored in the struct page to get to the hugetlbfs > >superblock, so we could just store a direct superblock pointer > >instead, and bump it's refcount when we put that in the page private > >pointer. > > > >But then I'm not sure how qemu would detect that it's on a kernel > >where the bug is fixed and allow -mem-path to be used again. Any > >ideas? > > If it's just a kernel bug, the fix belongs in the kernel, not in qemu. Obviously. > We used to have KVM_CAPs to declare this sort of thing > (KVM_CAP_HUGETLBFS_WORKS_EVEN_WITHOUT_SYNC_MMU) but I don't think it > was a good idea. I tend to agree - especially since there's nothing actually kvm specific about this bug. AFAICT a driver which did gup on hugepages could trigger the bug equally well. -- 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