From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRU7a-00068F-4m for qemu-devel@nongnu.org; Sun, 24 Jul 2016 20:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRU7V-0003rA-UZ for qemu-devel@nongnu.org; Sun, 24 Jul 2016 20:51:49 -0400 Received: from gate.crashing.org ([63.228.1.57]:41218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRU7V-0003r1-Kz for qemu-devel@nongnu.org; Sun, 24 Jul 2016 20:51:45 -0400 Message-ID: <1469407897.8568.268.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Mon, 25 Jul 2016 10:51:37 +1000 In-Reply-To: <1469407593.8568.265.camel@kernel.crashing.org> References: <1469364141.8568.251.camel@kernel.crashing.org> <1469364697.8568.253.camel@kernel.crashing.org> <1469364745.8568.254.camel@kernel.crashing.org> <5eede4b0-cc3a-c24f-5de4-8473220385f9@twiddle.net> <1469407593.8568.265.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TCG problem with cpu_{st,ld}x_data ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org Cc: Paolo Bonzini , Christian Borntraeger On Mon, 2016-07-25 at 10:46 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2016-07-25 at 06:06 +0530, Richard Henderson wrote: > >=20 > > These functions would have to be always_inline for this to work.=C2=A0 > > Otherwise you=C2=A0 > > could get the helper's PC, not the TCG caller's PC. > >=20 > > But let's try to fix this the other way. >=20 > I could use some help there as I don't really understand the PC fixup > adjustment mechanism in qemu...=C2=A0 One thing I can do, but I don't know whether that's worthwhile (you tell me), is change all translation helpers in powerpc to do like x86, which is to pass the RA along and never use the non_ra() variants. But that's quite a bit of churn, so let me know if your plan is better. Are those functions always meant to be called within translation helpers ? IE, the fault can safely longjmp out and it's just a matter of finding the proper instruction PC to report ? Or can they also be called outside of that context ? Cheers, Ben.