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 19:08:31 +0200 Message-ID: <4CDAD18F.7010900@redhat.com> References: <1288639205.2059.34.camel@yhuang-mobile> <4CCF136D.5080307@linux.vnet.ibm.com> <4CD58121.2040209@redhat.com> <1289179768.3532.3.camel@yhuang-dev> <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> 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]:60196 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757149Ab0KJRJA (ORCPT ); Wed, 10 Nov 2010 12:09:00 -0500 In-Reply-To: <20101110164233.GE7205@basil.fritz.box> Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2010 06:42 PM, Andi Kleen wrote: > > We need host kernel to break down the 2M huge page into 4k pages. Then > > send SIGBUS to QEMU with the poisoned 4k page. Because host kernel will > > poison the whole 2M virtual address space otherwise, and other 4k pages > > inside the 2M page can not used accessed in guest (will trigger SIGBUS > > and SRAR MCE). > > The easiest way would be to port the respective code from Andrea's > transparent hugetlb patchkit. It already does break down huge pages > as needed. You just have to be careful to not touch (/copy) the corrupted > subpage. Doing it in userspace in easier, since we can replace the vma for that section (and avoid mixed 4k/2M pages in hugetlbfs). With transparent hugepages it's easy of course, you just call split_hugepage() and poison the 4k page. -- error compiling committee.c: too many arguments to function