qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] add 'monitor' and 'mwait' instruction (update)


From: Jamie Lokier
Subject: Re: [Qemu-devel] add 'monitor' and 'mwait' instruction (update)
Date: Sun, 9 Jul 2006 16:11:49 +0100
User-agent: Mutt/1.4.1i

Joachim Henke wrote:
> Currently the Linux kernel simply uses monitor/mwait as a faster  
> 'hlt' replacement, so it should be "safe" there. I don't know about  
> other guest OSs. Anyway, I proposed this hack only as a quick  
> "solution" for local usage.

As long as there's only one CPU and 'mwait' isn't used to wait for a
_device_ writing to memory, then giving it the same behaviour as 'hlt'
will be fine.  In that case, the only way the memory could be written
is as a result of an interrupt, which wakes 'hlt' too.

If there's more than one CPU, or the OS uses 'mwait' to wait for a
device writing to memory, then you can emulate it accurately by
trapping access to the page containing the waited-on location(s) using
the MMU, although the performance may or may not be adequate.

-- Jamie




reply via email to

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