[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: Suggestion - trap window-close of VM

From: Struan Bartlett
Subject: Re: [Qemu-devel] Re: Suggestion - trap window-close of VM
Date: Wed, 30 Mar 2005 23:43:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

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)


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]