Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGlMd-0006zC-Sc for qemu-devel@nongnu.org; Wed, 30 Mar 2005 17:08:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGlMV-0006wW-UE for qemu-devel@nongnu.org; Wed, 30 Mar 2005 17:08:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGlMV-0006qE-Kn for qemu-devel@nongnu.org; Wed, 30 Mar 2005 17:08:31 -0500 Received: from [217.204.41.189] (helo=kula.newsnow.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DGkyM-0002N6-S4 for qemu-devel@nongnu.org; Wed, 30 Mar 2005 16:43:35 -0500 Received: from r3j188.chello.upc.cz ([213.220.201.188] helo=[192.168.0.4]) by kula.newsnow.net with esmtp (Exim 3.35 #1 (Debian)) id 1DGkx2-0002di-00 for ; Wed, 30 Mar 2005 22:42:12 +0100 Message-ID: <424B1D7D.2030707@praguespringpeople.org> Date: Wed, 30 Mar 2005 23:43:25 +0200 From: Struan Bartlett MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Suggestion - trap window-close of VM References: <4247EBB0.6090409@praguespringpeople.org> <200503292352.20141.paul@codesourcery.com> <424A9994.1070508@praguespringpeople.org> <20050330124816.GA10714@xi.wantstofly.org> <424AA90A.1060103@praguespringpeople.org> <20050330182255.GA11868@xi.wantstofly.org> <424B093A.80202@win4lin.com> In-Reply-To: <424B093A.80202@win4lin.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 I think there's two good points here. Of course it's true that, just because *(EIP-1) == 0xF4 and IF is cleared, it cannot be deduced with certainty that the previous instruction was an HLT and not a multi-byte instruction ending in 0xF4. I was wrong about that. Something like 'cli' then 'mov al,0xf4' might have been the previous instructions. You are right. However, as a practical matter, I think it's true that this can't be a very common scenario. Before I added the 'IF-cleared' test to my patch I was routinely experiencing false positives (i.e. when closing the window, the patch would judge the guest as having halted when it clearly wasn't). But since I added the IF-cleared test to the patch I haven't personally experienced one single false positive (i.e. it has never so-far judged the guest as having halted when it wasn't) - and I must have tested it over fifty times so far. I understand though that this may not yet be good enough reliability for some people, but if it helps anybody at all I'd be pleased. Anyhow, I can't say I find this patch's halt-detection method very satisfactory except as a purely interim measure. A solution to the APM bug would be much preferable. I'm looking at the APM Bios Interface Specification v1.2 now (http://www.phamhoaiviet.com/archives%5Cebooks%5Capmv12.rtf) Struan Leonardo E. Reiter wrote: > If I understand this correctly, it's specifically doing a halt with > interrupts disabled. In theory that should just halt the processor > indefinitely, since interrupts cannot be received. I can't imagine > this being a common scenario for any software other than when it is > completely shut down, unless of course you are explicitly expecting a > non-maskable interrupt, which cannot be disabled, during a halt > instruction. Again, I don't think it's all that common. > > - Leo Reiter > > Lennert Buytenhek wrote: > >> >> So now you're implying that disabling interrupts is something that >> only very rarely happens, for example when shutting down the machine? >> I don't think that is a very realistic assumption. >