[Top][All Lists]

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

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

From: Ryan Rempel
Subject: [Qemu-devel] Re: Suggestion - trap window-close of VM
Date: Tue, 29 Mar 2005 16:37:38 -0600

On Mon, 28 Mar 2005 13:34:08 +0200, Struan Bartlett
<address@hidden> wrote:

> I've attached a patch against the 2005-03-26 snapshot that implements 
> two '-on-quit' options for the emulator window: ignore-unless-halted and 
> suspend-unless-halted, that aim to make it safe to allow naive users to 
> (try to) close the VM window by trapping requests to shutdown and either 
> ignoring them or forcing a save of the VM state before obeying them.
> Caveat: I'll come clean straight away that the patch is implemented 
> using a nasty TARGET_i386-specific hack that detects whether the guest 
> operating system has permanently halted by looking to see if the last 
> instruction executed was 0xF4 and, if so, whether the IF flag is 
> cleared. Saying that, this system appears to work reasonably well on my 
> Pentium host running a Windows 2000 guest, but I have not tested it on 
> any other systems.

This isn't working quite right for me with a Windows 98 guest -- it
traps the attempt to close the window all right, but it doesn't let
the window close even when Window 98 has in fact shut down. I wonder
whether this is related to the "Windows 98 doesn't use the HLT
instruction" problem that is noted elsewhere (since that apparently
doesn't affect Windows 2000).

But I should say thanks first -- this is definitely the kind of thing
I was looking for!

reply via email to

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