From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAntb-0007RY-SJ for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:23:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAntX-0007Ki-Tl for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:23:54 -0400 Received: from [199.232.76.173] (port=42536 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAntX-0007KO-Gf for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:23:51 -0400 Received: from mail2.shareable.org ([80.68.89.115]:46749) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KAntX-0000fX-N1 for qemu-devel@nongnu.org; Mon, 23 Jun 2008 11:23:51 -0400 Date: Mon, 23 Jun 2008 16:23:48 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [RESENT][PATCH 2/2] x86: Issue reset on triple faults Message-ID: <20080623152348.GA16375@shareable.org> References: <485FBE18.4090603@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <485FBE18.4090603@siemens.com> 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 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. > +#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()? -- Jamie