From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJb3s-0007Y5-Io for qemu-devel@nongnu.org; Thu, 17 Jul 2008 17:30:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJb3r-0007XF-B4 for qemu-devel@nongnu.org; Thu, 17 Jul 2008 17:30:51 -0400 Received: from [199.232.76.173] (port=42975 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJb3q-0007Wv-F8 for qemu-devel@nongnu.org; Thu, 17 Jul 2008 17:30:50 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:56758) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJb3q-0000Bg-98 for qemu-devel@nongnu.org; Thu, 17 Jul 2008 17:30:50 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 75FD9E633C09 for ; Thu, 17 Jul 2008 23:30:49 +0200 (CEST) Received: from [88.65.255.225] (helo=[192.168.1.198]) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1KJb3p-0001jh-00 for qemu-devel@nongnu.org; Thu, 17 Jul 2008 23:30:49 +0200 Message-ID: <487FBA08.3010105@web.de> Date: Thu, 17 Jul 2008 23:30:48 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <487F3393.3040609@siemens.com> <200807171437.13717.paul@codesourcery.com> <487F6F0F.4010507@siemens.com> <200807171845.45005.paul@codesourcery.com> <487F9C7C.3070304@bellard.org> In-Reply-To: <487F9C7C.3070304@bellard.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9235F8EF975065A326CE5CB3" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [RFC][PATCH] x86: CS limit checks 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9235F8EF975065A326CE5CB3 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Fabrice Bellard wrote: > Paul Brook wrote: >>> To me it looks like as if the generator can so far raise a PF >>> prematurely when it steps on an invalid code address while building a= >>> new TB. This probably has to fix the same way as the limit check is >>> realized: by injecting an exception (PF or GP) into the generated cod= e >>> at the correct PC. Hmm, the PF-during-translation issue is probably n= ot >>> just limited to x86... >> >> Alpha, PPC, SPARC, SH and ARM avoid the problem by having fixed length= >> word aligned instructions. Thumb-1 has special handling for the >> cross-boundary case (Instructions aren't really variable length, we >> just treat them that way as an optimisation). >> >> Thumb-2, m68k, cris and x86 all look like they may incorrectly fetch >> code from the next page. >=20 > For x86 it is an expected behavior, not a bug. However, I agree that it= > would be safer to explicitely generate the exception. My plan has alway= s > been to suppress the ldx_code functions and to explicitly handle the PF= > and the cs_limit cases. This path offers another nice possibility: the introduction of a separate code TLB. I bet this will improve the hit rate on both the existing (and then data-only) TLB as well as the new one only for code. > Jocelyn Mayer submitted some time ago a patch to > go in that direction. Any links or keywords at hand? So far I failed to find this patch. Jan --------------enig9235F8EF975065A326CE5CB3 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 iEYEARECAAYFAkh/uggACgkQniDOoMHTA+lN2ACdGq7BDDAM8fuZju11E4YdUcOw 5NkAnRXE3w0dUWm4Y0lNh9aRMKk9qCvY =6OqP -----END PGP SIGNATURE----- --------------enig9235F8EF975065A326CE5CB3--