From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address Date: Wed, 10 Nov 2010 22:58:35 +0200 Message-ID: <4CDB077B.5000608@redhat.com> References: <4CD770E5.9000105@linux.vnet.ibm.com> <4CDA421C.2040308@redhat.com> <4CDA42B4.5060201@redhat.com> <1289374912.8719.65.camel@yhuang-dev> <4CDA57A7.5050801@redhat.com> <1289378284.8719.72.camel@yhuang-dev> <20101110164233.GE7205@basil.fritz.box> <4CDAD18F.7010900@redhat.com> <20101110174418.GB9011@basil.fritz.box> <4CDADA9F.9020501@redhat.com> <20101110191656.GC9011@basil.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Huang Ying , Anthony Liguori , Marcelo Tosatti , Anthony Liguori , "kvm@vger.kernel.org" , Dean Nelson , Luiz Capitulino To: Andi Kleen Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41014 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753654Ab0KJU65 (ORCPT ); Wed, 10 Nov 2010 15:58:57 -0500 In-Reply-To: <20101110191656.GC9011@basil.fritz.box> Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2010 09:16 PM, Andi Kleen wrote: > On Wed, Nov 10, 2010 at 07:47:11PM +0200, Avi Kivity wrote: > > On 11/10/2010 07:44 PM, Andi Kleen wrote: > > >> Doing it in userspace in easier, since we can replace the vma for > > >> that section (and avoid mixed 4k/2M pages in hugetlbfs). > > > > > >You can't do that today, there's no way currently to access the non corrupted > > >portion of the 2MB page. Once it's poisoned it's all gone. > > > > I see. Thanks. > > BTW my understanding is that KVM will only use hugepages with > transparent huge pages anyways, correct? There will always be those who want full control over every last bit; they will use hugetlbfs and numactl for manual allocation of resources for guests. General usage will be with transparent huge pages, though. > So it may be reasonable to simply fix this as part of the transparent > hugepages work, but ignore it before that. Transparent hugepages work only for anonymous memory. However, hugetlbfs is not the only option for backing -mempath memory; if poisoning works for tmpfs/shm or other file backed memory, we can use that to get named access to memory. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.