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 10:48:53 +0200 Message-ID: <4CDA5C75.2050403@redhat.com> References: <1288060789.2862.336.camel@yhuang-dev> <20101101160952.GE1429@amt.cnet> <4CCF0BAB.9000304@linux.vnet.ibm.com> <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=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Marcelo Tosatti , Anthony Liguori , "kvm@vger.kernel.org" , Andi Kleen , Dean Nelson , Luiz Capitulino To: Huang Ying Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754948Ab0KJItI (ORCPT ); Wed, 10 Nov 2010 03:49:08 -0500 In-Reply-To: <1289378284.8719.72.camel@yhuang-dev> Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2010 10:38 AM, Huang Ying wrote: > > > > If we get a full address (rather than just a frame number) then we can > > identify the 4k page and send an mce just for that frame? > > 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). > We could do that by using mmap(MAP_FIXED) or mremap(). It's probably not worth it just for testing, but it has a real use, no? Note we may need to stop the guest while we copy memory. -- error compiling committee.c: too many arguments to function