Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nlj2g-0005ai-2Q for qemu-devel@nongnu.org; Sun, 28 Feb 2010 08:18:42 -0500 Received: from [199.232.76.173] (port=45672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nlj2f-0005aa-L7 for qemu-devel@nongnu.org; Sun, 28 Feb 2010 08:18:41 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nlj2e-00027G-0u for qemu-devel@nongnu.org; Sun, 28 Feb 2010 08:18:41 -0500 Received: from hall.aurel32.net ([88.191.82.174]:49559) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nlj2d-00026e-NY for qemu-devel@nongnu.org; Sun, 28 Feb 2010 08:18:39 -0500 Date: Sun, 28 Feb 2010 14:18:30 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [Bug] qemu-system-ppc: "invalid/unsupported opcode" during debug session Message-ID: <20100228131830.GJ10291@volta.aurel32.net> References: <4B3A1B9D.7010004@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <4B3A1B9D.7010004@mail.berlios.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers On Tue, Dec 29, 2009 at 04:09:17PM +0100, Stefan Weil wrote: > Test environment: > > * ppc-softmmu/qemu-system-ppc running on x86_64 host > * emulated ppc is running debian lenny > > > > While debugging on the emulated ppc (each time when > a shared library is loaded after "r" command?), > qemu-system-ppc prints this error message: > > invalid/unsupported opcode: 00 - 00 - 00 (00000000) 4800fa44 1 > I have fixed that in HEAD by stopping the translation just after a trap, as the instructions might never be executed. It is not a full fix, as the OS can actually use any instruction that always generate a trap (even a memory access) as an instruction barrier to make sure the following instructions are never executed. This actually affects all targets, but is unlikely to happen. One solution for that would be to only generate an exception for an unsupported instruction when it is the first instruction of a TB, and otherwise just end the translation before this instruction. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net