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


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to