From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXNsw-0004zi-Ph for qemu-devel@nongnu.org; Wed, 23 May 2012 22:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXNsu-0008WD-R0 for qemu-devel@nongnu.org; Wed, 23 May 2012 22:34:42 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:40039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXNsu-0008Vx-Gw for qemu-devel@nongnu.org; Wed, 23 May 2012 22:34:40 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate03.web.de (Postfix) with ESMTP id EF6E41B4EB19C for ; Thu, 24 May 2012 04:34:38 +0200 (CEST) Message-ID: <4FBD9E3A.6080704@web.de> Date: Wed, 23 May 2012 23:34:34 -0300 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig97CB84336186EECE3D65DAEF" Subject: [Qemu-devel] [PATCH] TCG: Fix TB invalidation after breakpoint insertion/deletion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Blue Swirl Cc: Max Filippov , Avi Kivity , TeLeMan This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig97CB84336186EECE3D65DAEF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable From: Jan Kiszka tb_invalidate_phys_addr has to called with the exact physical address of the breakpoint we add/remove, not just the page's base address. Otherwise we easily fail to flush the right TB. Regression of 1e7855a558. Reported-by: TeLeMan Signed-off-by: Jan Kiszka --- exec.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index a0494c7..efa1345 100644 --- a/exec.c +++ b/exec.c @@ -1492,7 +1492,8 @@ void tb_invalidate_phys_addr(target_phys_addr_t add= r) =20 static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) { - tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc)); + tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc) + + (pc & ~TARGET_PAGE_MASK)); } #endif #endif /* TARGET_HAS_ICE */ --=20 1.7.3.4 --------------enig97CB84336186EECE3D65DAEF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+9njoACgkQitSsb3rl5xQY/QCfXP93QxEILaIvTpXA1YQLFLtm iZAAn0ukexaN3WUlfxc/gPBkLg2QoyWH =0ZSg -----END PGP SIGNATURE----- --------------enig97CB84336186EECE3D65DAEF--