From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAp9J-0003Uu-3p for qemu-devel@nongnu.org; Sat, 08 May 2010 14:53:17 -0400 Received: from [140.186.70.92] (port=53742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAp9H-0003Um-CV for qemu-devel@nongnu.org; Sat, 08 May 2010 14:53:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAp9E-0008B9-0J for qemu-devel@nongnu.org; Sat, 08 May 2010 14:53:15 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:41149) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAp9D-0008Aq-Ly for qemu-devel@nongnu.org; Sat, 08 May 2010 14:53:11 -0400 Message-ID: <4BE5B315.20206@web.de> Date: Sat, 08 May 2010 20:53:09 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDCAD968A7F23DD2FC8950914" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page() (resend) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jun Koi Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDCAD968A7F23DD2FC8950914 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jun Koi wrote: > This patch avoids handling write watchpoints on read-only memory access= =2E > It also breaks the searching loop for watchpoint once the setup for > handling watchpoint later is done. >=20 > Signed-off-by: Jun Koi >=20 Works fine. Acked-by: Jan Kiszka >=20 > diff --git a/exec.c b/exec.c > index 14d1fd7..6fd859f 100644 > --- a/exec.c > +++ b/exec.c > @@ -2236,10 +2236,12 @@ void tlb_set_page(CPUState *env, target_ulong v= addr, > watchpoint trap routines. */ > QTAILQ_FOREACH(wp, &env->watchpoints, entry) { > if (vaddr =3D=3D (wp->vaddr & TARGET_PAGE_MASK)) { > - iotlb =3D io_mem_watch + paddr; > - /* TODO: The memory case can be optimized by not trapping > - reads of pages with a write breakpoint. */ > - address |=3D TLB_MMIO; > + /* Avoid trapping reads of pages with a write breakpoint. = */ > + if ((prot & PAGE_WRITE) || (wp->flags & BP_MEM_READ)) { > + iotlb =3D io_mem_watch + paddr; > + address |=3D TLB_MMIO; > + break; > + } > } > } --------------enigDCAD968A7F23DD2FC8950914 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.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvlsxUACgkQitSsb3rl5xQdSQCfe3f/EcoSZEIswHPdA50KFkrt dxIAnRUOAMl73wSJVPlT2eF6wqgkQav1 =2bVA -----END PGP SIGNATURE----- --------------enigDCAD968A7F23DD2FC8950914--