From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jm5uq-0001T7-7d for qemu-devel@nongnu.org; Wed, 16 Apr 2008 07:35:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jm5un-0001Sv-Jw for qemu-devel@nongnu.org; Wed, 16 Apr 2008 07:35:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jm5un-0001Ss-Fn for qemu-devel@nongnu.org; Wed, 16 Apr 2008 07:35:01 -0400 Received: from mail2.shareable.org ([80.68.89.115]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jm5un-0003wA-7i for qemu-devel@nongnu.org; Wed, 16 Apr 2008 07:35:01 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1Jm5uk-0007nd-Fj for qemu-devel@nongnu.org; Wed, 16 Apr 2008 12:34:58 +0100 Date: Wed, 16 Apr 2008 12:34:58 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH] Reboot CPU on triple fault Message-ID: <20080416113458.GA29762@shareable.org> References: <47EE86E0.4070703@reactos.org> <47F0B445.4030806@suse.de> <4804D254.5040301@siemens.com> <200804151757.05303.paul@codesourcery.com> <4805BAB0.1030707@suse.de> <20080416092340.GA27898@shareable.org> <4805CC9B.7050809@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4805CC9B.7050809@suse.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 Kevin Wolf wrote: > > Not many, only those users running old MS-DOS apps / OSes. > > MS-DOS is running in Real Mode, you'd additionally need an application > which uses 286 PM. Apparently there aren't too many users relying on > triple faults as in the past qemu aborted (or in earlier versions even > hung) on triple faults and nobody complained. That's true. I think they use Bochs instead. > > 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. CPU reset is the only way to exit 286 protected mode, and that is needed when context switching between real and protected mode tasks. So apps set a byte in the CMOS NVRAM, trigger a processor reset, then the BIOS reset code immediately jumps back to the app in real mode, avoiding the normal reboot process. It's slow and silly, but faster than the other method, asking the keyboard controller to do it. -- Jamie