From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Po1OQ-000875-Ts for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:23:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Po1OP-0002ij-OL for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:23:10 -0500 Received: from mail.serverraum.org ([78.47.150.89]:46838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Po1OP-0002ib-Gy for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:23:09 -0500 From: Michael Walle Subject: Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines Date: Fri, 11 Feb 2011 23:23:05 +0100 References: <1297379530-23487-1-git-send-email-michael@walle.cc> <1297379530-23487-3-git-send-email-michael@walle.cc> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201102112323.06089.michael@walle.cc> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: "Edgar E. Iglesias" , Richard Henderson , qemu-devel@nongnu.org, Alexander Graf Hi, Regarding all the comments on raising an exception. The real hardware does only support a few basic exception (like div by zero or interrupts and system calls). There is no checking if an instruction is supported or not. If an illegal opcode (like divu if the hardware divider is not enabled) is decoded, the behaviour is undefined. Additionally, there are no privileged instructions, no distinction between kernel and userspace, no memory protection, the LM32 CPU targets to be a lightweight and relative fast softcore for FPGAs. There are many ways to kill the VM from 'userspace' (in real hardware and in my qemu port :) ) I treat QEMU as a tool to help developers writing software for this platform, rather than really running software inside a VM. That said, IMHO the best handling of unknown opcodes would be to kill the VM. -- Michael