From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T30wt-0007F6-1O for qemu-devel@nongnu.org; Sun, 19 Aug 2012 04:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T30wq-0003JO-Kj for qemu-devel@nongnu.org; Sun, 19 Aug 2012 04:33:30 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:54530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T30wp-0003Ii-RH for qemu-devel@nongnu.org; Sun, 19 Aug 2012 04:33:28 -0400 Date: Sun, 19 Aug 2012 16:33:13 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120819083312.GA12309@cs.nctu.edu.tw> References: <20120817111436.GB67669@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] qemu log function to print out the registers of the guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: Laurent Desnogues , Steven , qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= On Fri, Aug 17, 2012 at 03:57:55PM +0400, Max Filippov wrote: > On Fri, Aug 17, 2012 at 3:14 PM, =E9=99=B3=E9=9F=8B=E4=BB=BB (Wei-Ren C= hen) > wrote: > >> > On Thu, Aug 16, 2012 at 7:49 PM, Steven w= rote: > >> > [...] > >> >> I want to get the guest memory address in the instruction mov > >> >> 0x4(%ebx) %eax, whic is 0x4(%ebx). > >> >> Since %ebx is not resolved until the execution time, the code in > >> >> softmmu_header.h does not generate any hit or miss information. > >> >> Do you know any place that I could resolve the memory access addr= ess? Thanks. > >> > > >> > You'll have to generate code. Look at how helpers work. > >> Hi, Laurent, > >> do you mean the target-i386/op_helper.c/helper.c or the tcg helper? = Thanks. > > > > What do you mean by "resolve the memory access address"? Do you wan= t > > to get guest virtual address for each guest memory access, right? As = Max > > mentioned before (you can also read [1]), there are fast and slow pat= h > > in QEMU softmmu, tlb hit and tlb miss respectively. Max provided patc= h > > for slow path. As for fast path, take a look on tcg_out_tlb_load (tcg > > /i386/tcg-target.c). tcg_out_tlb_load will generate native code in th= e > > code cache to do tlb lookup, I think you cannot use the trick Max use= d > > since tcg_out_tlb_load will not be called when the fast path executed= , >=20 > That's why I've posted the following hunk that should have made all > accesses go via slow path: Ya, I know. :) Just try to explain what Laurent want to say. Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj