From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T40Yb-000258-M9 for qemu-devel@nongnu.org; Tue, 21 Aug 2012 22:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T40YX-0000FH-La for qemu-devel@nongnu.org; Tue, 21 Aug 2012 22:20:33 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:30114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T40YX-0000En-4F for qemu-devel@nongnu.org; Tue, 21 Aug 2012 22:20:29 -0400 Date: Wed, 22 Aug 2012 10:20:26 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120822022026.GA11966@cs.nctu.edu.tw> References: <20120821072134.GA81486@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] Dump guest page table inside QEMU makes system hang List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= > > The system will hang while booting. However, if I comment > > cpu_physical_memory_read in function dump_guest_pgtable, there > > is no problem. What I am missing here? Thanks. >=20 > cpu_physical_memory_read() can cause faults or other side effects like > MMIO. Using cpu_get_phys_page_debug() may help. PMM also suggest me looking on cpu_get_phys_page_debug. When I read the code, I found something suspicious. --- target_phys_addr_t cpu_get_phys_page_debug(CPUX86State *env, target_ulong= addr) { target_ulong pde_addr, pte_addr; ... pde =3D ldq_phys(pde_addr); ... } --- The address of pde and pte should be (guest) physical address, right? If so, then target_ulong should be replaced with target_phys_addr_t. The other clue is the type of ldq_phys's parameter is target_phys_addr_t. 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