From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXNMI-0003bL-6f for qemu-devel@nongnu.org; Wed, 23 May 2012 22:00:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXNMG-0005lB-6w for qemu-devel@nongnu.org; Wed, 23 May 2012 22:00:57 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:52578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXNMF-0005jd-Th for qemu-devel@nongnu.org; Wed, 23 May 2012 22:00:56 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate02.web.de (Postfix) with ESMTP id 79EC81C4D2B8F for ; Thu, 24 May 2012 04:00:53 +0200 (CEST) Message-ID: <4FBD964C.4080401@web.de> Date: Wed, 23 May 2012 23:00:44 -0300 From: Jan Kiszka MIME-Version: 1.0 References: <4FBC5C67.1080007@suse.de> <4FBCC877.30003@siemens.com> <4FBD0A0B.1060106@siemens.com> <4FBD2038.7070007@siemens.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD28D0563016152E5D24AC6C8" Subject: Re: [Qemu-devel] [PATCH] exec: fix breakpoint_invalidate() breakage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TeLeMan Cc: Avi Kivity , qemu-devel , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD28D0563016152E5D24AC6C8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-05-23 22:29, TeLeMan wrote: > On Thu, May 24, 2012 at 1:36 AM, Jan Kiszka wr= ote: >> On 2012-05-23 13:02, Jan Kiszka wrote: >>> On 2012-05-23 11:11, TeLeMan wrote: >>>> On Wed, May 23, 2012 at 7:22 PM, Jan Kiszka = wrote: >>>>> On 2012-05-23 04:09, TeLeMan wrote: >>>>>> On Wed, May 23, 2012 at 11:41 AM, Andreas F=C3=A4rber wrote: >>>>>>> Am 18.05.2012 11:49, schrieb TeLeMan: >>>>>>>> This breakage was introduced by the commit "memory: make >>>>>>>> phys_page_find() return an unadjusted". >>>>>>> >>>>>>> You seem to have found the origin of your problem. If you also me= ntion >>>>>>> the commit hash in your commit message then certain frontends (gi= tk, >>>>>>> repo.or.cz) will display it as a handy hyperlink to that commit. >>>>>>> >>>>>>>> >>>>>>>> Signed-off-by: TeLeMan >>>>>>> >>>>>>> Signed-off-by is a legal statement of origin and must not be a ps= eudonym. >>>>>> Ok, please ignore this patch. I won't submit any patch just report= bugs. >>>>> >>>>> Then please describe this bug in more details, e.g. how to reproduc= e. >>>> I think its evident. cpu_get_phys_page_debug(env, pc) is not the >>>> physical address of pc but the physical page base address of pc. >>> >>> ...so this bites us if the instruction spans two pages as >>> tb_invalidate_phys_addr requests invalidation on a page granularity. >> >> In fact, this is irrelevant. We only need to flush the address at whic= h >> the instruction starts, and that is achieved by flushing all TB that >> relate to that page as the current code does. >=20 > But the instruction start is wrong and its TB may not be found. For exa= mple, > the pc is 0x1234 and its physical address is 0x1234. The correct > "start" and "end" of tb_invalidate_phys_page_range() is 0x1234 and > 0x1235. But now the "start" and "end" is 0x1000 and 0x1001. > If 0x1000 is not translated yet, the real TB won't be invalidated. The tb containing 0x1234 would be linked to the list of TBs that are related to the 0x1000 page. As we declare that page invalid, all affected TBs are dropped, not just the one containing the breakpoint. See tb_invalidate_phys_page_range. Jan --------------enigD28D0563016152E5D24AC6C8 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+9llAACgkQitSsb3rl5xR9gQCgz4v1lQUZRaYP8v8Xb/TupNW/ DdIAn37p4t0RBNzhxiZ6Pnb61loh5gR7 =9swF -----END PGP SIGNATURE----- --------------enigD28D0563016152E5D24AC6C8--