Received: from eggs.gnu.org ([140.186.70.92]:45938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8VR4-0005w8-Oa for qemu-devel@nongnu.org; Tue, 27 Sep 2011 07:02:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8VR2-00033n-M1 for qemu-devel@nongnu.org; Tue, 27 Sep 2011 07:02:50 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:52668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8VR2-0002xS-6E for qemu-devel@nongnu.org; Tue, 27 Sep 2011 07:02:48 -0400 Date: Tue, 27 Sep 2011 19:02:36 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20110927110236.GA98616@cs.nctu.edu.tw> References: <20110927041528.GA74070@cs.nctu.edu.tw> <4E81760F.809@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4E81760F.809@web.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] When the tlb_fill will be called from generated code? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7?= Hi, Jan > You can find the answer yourself: Load qemu into gdb, set a breakpoint > on that function and let it run. If you want to catch only the retaddr > =3D=3D NULL case, make the breakpoint conditional. Thanks for your tip. I see when retaddr !=3D NULL, then the calling sequence of tlb_fill might be something like (take i386 guest for example): - __stl_mmu/__ldl_mmu -> tlb_fill - helper_ljmp_protected -> load_segment -> ldl_kernel -> __ldl_mmu I am not sure when/where __stl_mmu/__ldl_mmu are used. I do set breakpoint on __stl_mmu/__ldl_mmu, but the backtrace can only show something like, #0 __stl_mmu (addr=3D196608, val=3D0, mmu_idx=3D0) at /tmp/chenwj/temp/q= emu-0.13.0/softmmu_template.h:228 #1 0x00000000400028e1 in ?? () #2 0x00000000000000b4 in ?? () #3 0xecc68ff412fa4137 in ?? () #4 0x0000000000000000 in ?? () When retaddr =3D=3D NULL, then the calling sequence of tlb_fill is, tb_find_slow -> get_page_addr_code -> ldub_code -> __ldb_cmmu I can only guest the b in __ldb_cmmu means load byte, but I can't figure out what's the difference between _cmmu and _mmu. Could you give me some hint? Thanks! 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