From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FBCZt-0003YF-3f for qemu-devel@nongnu.org; Mon, 20 Feb 2006 10:03:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FBCZp-0003XC-6j for qemu-devel@nongnu.org; Mon, 20 Feb 2006 10:03:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBCZo-0003Wq-0A for qemu-devel@nongnu.org; Mon, 20 Feb 2006 10:03:48 -0500 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FBCfr-0002Pe-3f for qemu-devel@nongnu.org; Mon, 20 Feb 2006 10:10:03 -0500 From: Paul Brook Subject: Re: [Qemu-devel] new entry in Qemu forum-- Andre Pech's fix on gdbstub Date: Mon, 20 Feb 2006 15:03:43 +0000 References: <200602131206.49371.a_mulyadi@softhome.net> <200602191539.14532.paul@codesourcery.com> <200602201158.22317.a_mulyadi@softhome.net> In-Reply-To: <200602201158.22317.a_mulyadi@softhome.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602201503.44076.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, a_mulyadi@softhome.net Cc: Andre Pech On Monday 20 February 2006 04:58, Mulyadi Santosa wrote: > Hi... > > On Sunday 19 February 2006 22:39, Paul Brook wrote: > > This patch is not sufficient. > > > > There seems to be some inconsistency whether cpu_get_phys_page_debug > > returns the physical address or the base address of the page. > > Hm, I am not so sure either. Anyway, using cscope to find out which > functions that calls cpu_phys_page_debug, seems like it is only called > during breakpoint setup. So, what ever we do inside > cpu_get_phys_page_debug doesn't seem affecting other places. Ideally we'd fix the implementations of cpu_get_phys_page_debug so they are consistent. IIRC i386-softmmu and ppc-softmmu usually return the page base address, whereas everything else returns the actual address. Typically the softmmu implementations use the same pagetable walking code as the normal tlb fault handling. The quick and nasty solution is to make breakpoint_invalidate round the address to a page boundary before calling cpu_get_phys_page_debug, like cpu_memory_rw_debug does. Paul