From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAo4l-0007Av-MF for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:35:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAo4l-0007Ai-DI for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:35:27 -0400 Received: from [199.232.76.173] (port=50728 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAo4l-0007Af-5B for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:35:27 -0400 Received: from gecko.sbs.de ([194.138.37.40]:23190) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KAo4k-0005zD-Vd for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:35:27 -0400 Message-ID: <485FC2BC.3040503@siemens.com> Date: Mon, 23 Jun 2008 17:35:24 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <485FBE18.4090603@siemens.com> <20080623152348.GA16375@shareable.org> In-Reply-To: <20080623152348.GA16375@shareable.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RESENT][PATCH 2/2] x86: Issue reset on triple faults Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@suse.de Jamie Lokier wrote: > Jan Kiszka wrote: >> As discussed a few times on this list: A triple fault causes a system >> reset on x86, and some guests make use of this. To keep the chance of >> tracing unexpected resets, log them if CPU_LOG_RESET is set. > > It might be worth distinguishing between > triple-fault-used-by-guest-for-context-switch and triple faults which > trigger a normal reset, and log only the latter. There's a > standardish way of distinguishing them, which the BIOS should check. You refer to setting some return address at some magic BIOS location? Isn't this something the BIOS should handle, not QEMU? > >> +#if !defined(CONFIG_USER_ONLY) >> + if (env->old_exception == EXCP08_DBLE) { >> + if (env->hflags & HF_SVMI_MASK) >> + helper_vmexit(SVM_EXIT_SHUTDOWN, 0); >> + >> + if (loglevel & CPU_LOG_RESET) >> + fprintf(logfile, "Triple fault\n"); >> + >> + qemu_system_reset_request(); >> + return EXCP_HLT; >> + } >> +#endif > > When helper(SVM_EXIT_SHUTDOWN, 0) is called, should it still also call > qemu_system_reset_request()? helper_vmexit() is not expected to return (cpu_loop_exit). Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux