From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRpDE-0000r2-3l for qemu-devel@nongnu.org; Mon, 25 Jul 2016 19:23:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRpD9-0004oW-Sv for qemu-devel@nongnu.org; Mon, 25 Jul 2016 19:23:03 -0400 Received: from gate.crashing.org ([63.228.1.57]:40561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRpD9-0004oR-JJ for qemu-devel@nongnu.org; Mon, 25 Jul 2016 19:22:59 -0400 Message-ID: <1469488962.5978.70.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Tue, 26 Jul 2016 09:22:42 +1000 In-Reply-To: <1469486567.5978.67.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> <1469407897.8568.268.camel@kernel.crashing.org> <1469482923.5978.54.camel@kernel.crashing.org> <1469486567.5978.67.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Peter Maydell Cc: Richard Henderson , QEMU Developers , Paolo Bonzini , Christian Borntraeger On Tue, 2016-07-26 at 08:42 +1000, Benjamin Herrenschmidt wrote: > We do something a bit different on ppc where we store the access type > before every access, however the DSISR case is special in that on > older > CPUs, it's expected to contains a whole subset of the opcode which is > quite a bit more info than what you want here... > > I'm thinking maybe we should use a form of load that returns an error > instead of longjmp'ing, and if we do error out, flush the tb for that > instruction and replay which should cause the translate path to > reload > the TLB for it but it's still fishy. I have a better idea ! This is only a problem for alignment interrupts, and those are very rare, we only generate them in some cases of broken forms like trying to do a ll/sc on an unaligned address. So I'm thinking I'm just going to pass the opcode to the helper in the error_code field. Cheers, Ben.