From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address Date: Wed, 10 Nov 2010 17:42:33 +0100 Message-ID: <20101110164233.GE7205@basil.fritz.box> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Anthony Liguori , Marcelo Tosatti , Anthony Liguori , "kvm@vger.kernel.org" , Andi Kleen , Dean Nelson , Luiz Capitulino To: Huang Ying Return-path: Received: from one.firstfloor.org ([213.235.205.2]:36484 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756405Ab0KJQmf (ORCPT ); Wed, 10 Nov 2010 11:42:35 -0500 Content-Disposition: inline In-Reply-To: <1289378284.8719.72.camel@yhuang-dev> Sender: kvm-owner@vger.kernel.org List-ID: > 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. -Andi -- ak@linux.intel.com -- Speaking for myself only.