Received: from [140.186.70.92] (port=60294 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqCgr-0000JL-29 for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:51:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqCgo-0001Qa-6g for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:51:11 -0500 Received: from mail.serverraum.org ([78.47.150.89]:49803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqCgo-0001QV-0Y for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:51:10 -0500 From: Michael Walle Subject: Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines Date: Thu, 17 Feb 2011 23:51:10 +0100 References: <1297379530-23487-1-git-send-email-michael@walle.cc> <201102112323.06089.michael@walle.cc> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201102172351.10938.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 Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl: > > That said, IMHO the best handling of unknown opcodes would be to kill the > > VM. > > In this case it should be OK. Alternatively the VM could be halted, so > that instead of restarting QEMU, only system_reset needs to be issued. > This may be more useful for developers, since for example registers > and memory can be examined after the error. Good idea! May I call vm_stop() in a tcg helper? Like in the following example: void helper_vm_stop(uint32_t msg_id) { if (qemu_log_enabled()) { qemu_log("VM stopped: %s", err_msg_str[msg_id]); } else { fprintf(stderr, "VM stopped: %s", err_msg_str[msg_id]); } #ifndef CONFIG_USER_ONLY vm_stop(0); #endif env->exception_index = EXCP_HALTED; cpu_loop_exit(); } If not, what is the proper way to stop/pause the VM from within the executed code?