From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huang Ying Subject: Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address Date: Tue, 09 Nov 2010 11:06:01 +0800 Message-ID: <1289271961.32087.40.camel@yhuang-dev> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , Anthony Liguori , "kvm@vger.kernel.org" , Andi Kleen , Dean Nelson , Luiz Capitulino To: Anthony Liguori Return-path: Received: from mga03.intel.com ([143.182.124.21]:45742 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753843Ab0KIDGZ (ORCPT ); Mon, 8 Nov 2010 22:06:25 -0500 In-Reply-To: <4CD770E5.9000105@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2010-11-08 at 11:39 +0800, Anthony Liguori wrote: > On 11/07/2010 07:29 PM, Huang Ying wrote: > > On Sun, 2010-11-07 at 00:24 +0800, Avi Kivity wrote: > > > >> On 11/01/2010 03:22 PM, Anthony Liguori wrote: > >> > >>> On 11/01/2010 02:20 PM, Huang Ying wrote: > >>> > >>>> Yes. As general interface, it may not work so well, but as test > >>>> interface, it works quite well and useful. > >>>> > >>>> Do we have any mechanism to add a test only interface? > >>>> > >>> I'd like to see what Luiz/Markus think but definitely only a human > >>> monitor interface and probably prefix the command with a 'x-' prefix > >>> to indicate that it's not a supported interface. > >>> > >>> > >> Automated testing will want to use qmp. > >> > > Yes. The main usage of the interface is automated testing. > > > > That's precisely what the command should not be used for. > > You can't assume a gpa -> hva mapping is consistent in an external > application. If you want to implement an interface for testing, you > have to push more of the logic into QEMU to avoid the race. >>From the code of cpu_physical_memory_map(), it seems that if the 'addr' is physical address in RAM, the mapping should be consistent at least for x86, doesn't it? Best Regards, Huang Ying