From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXYzz-0000mu-SN for qemu-devel@nongnu.org; Thu, 24 May 2012 10:26:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXYzt-0001Al-KG for qemu-devel@nongnu.org; Thu, 24 May 2012 10:26:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXYzt-0001AN-C9 for qemu-devel@nongnu.org; Thu, 24 May 2012 10:26:37 -0400 Message-ID: <4FBE4518.4000402@redhat.com> Date: Thu, 24 May 2012 17:26:32 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4FBD9E3A.6080704@web.de> <4FBE1A98.3090708@siemens.com> <4FBE26AF.2090103@siemens.com> <4FBE3716.6040205@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] TCG: Fix TB invalidation after breakpoint insertion/deletion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: Blue Swirl , Jan Kiszka , qemu-devel , TeLeMan On 05/24/2012 05:11 PM, Max Filippov wrote: >> >> Not in breakpoint_invalidate as the missing offset was compensated >> before your commit (well, starting with c2f07f81a2 in fact). > > I'd say that compensation that you mention > > ram_addr = (memory_region_get_ram_addr(section.mr) > + section.offset_within_region) & TARGET_PAGE_MASK; > this >>>> ram_addr |= (pc & ~TARGET_PAGE_MASK); > tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0); > > was removed by f3705d53296d, not by 1e7855a558 Indeed. Note how the |= cleverly accommodates both truncating and non-truncating cpu_get_phys_page_debug(). > >> But it looks like cpu_get_phys_page_debug was broken for quite a while. >> Let's fix those archs to return more than page-aligned addresses. > > You mean make them all return full physical address? > I'd propose to rename the function then as well. > Agree to both. cpu_translate_virtual_address() or similar would be more explanatory IMO. btw, how does the thing work for soft-tlb cpus? It looks like this thing should trigger on tlb loads, not when the breakpoint is set. This is true for hardware page tables as well, as the mapping can change, though it's less likely. -- error compiling committee.c: too many arguments to function