Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jm4iZ-00078I-BM for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:18:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jm4iX-00076X-Ef for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:18:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jm4iX-00076I-8u for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:18:17 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Jm4iW-0002hi-Oq for qemu-devel@nongnu.org; Wed, 16 Apr 2008 06:18:17 -0400 From: Michal Schulz Subject: Re: [Qemu-devel] Re: [PATCH] Reboot CPU on triple fault Date: Wed, 16 Apr 2008 12:17:32 +0200 References: <47EE86E0.4070703@reactos.org> <20080416092340.GA27898@shareable.org> <4805CC9B.7050809@suse.de> In-Reply-To: <4805CC9B.7050809@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804161217.33019.michal.schulz@gmx.de> 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 On Wednesday 16 April 2008, Kevin Wolf wrote: > > For old MS-DOS apps / OSes, I have the impression this can happen > > hundreds of times per second. It's part of task context switching and > > BIOS calls. > > I have to admit that I'm all but an 286 PM expert. What exactly is a > triple fault doing there? If it leads to a reset as implemented here, I > can hardly imagine that it is of much use in regular context switching. It is required due to the "feature" of 286 CPU. Once 286 enters protected mode, it cannot be switched back to the real mode. The only way to perform it is resetting the CPU. A software which tries to go back from protected to real mode sets the warm-reset vector in BIOS memory area, sets the reboot reason variable in CMOS memory and issues a CPU reset. CPU may be resetted due to a triple fault :) -- Michal Schulz