All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] add 'monitor' and 'mwait' instruction (update)
Date: Sun, 9 Jul 2006 16:11:49 +0100	[thread overview]
Message-ID: <20060709151149.GA31080@mail.shareable.org> (raw)
In-Reply-To: <1AC114B9-DB82-4F97-B0A8-831233CA2ECE@gmx.de>

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

      parent reply	other threads:[~2006-07-09 15:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06 15:13 [Qemu-devel] Pentium D with guest Ubuntu 6.06 server kernel panic with kqemu R. Armiento
2006-07-07  9:06 ` Joachim Henke
2006-07-07  9:39   ` Jens Axboe
2006-07-07 13:39   ` R. Armiento
2006-07-07 12:30 ` [Qemu-devel] [PATCH] add 'monitor' and 'mwait' instruction Joachim Henke
2006-07-07 12:57   ` maestro
2006-07-07 13:22     ` Joachim Henke
2006-07-07 15:21     ` Joachim Henke
2006-07-07 13:18   ` [Qemu-devel] [PATCH] add 'monitor' and 'mwait' instruction (update) Joachim Henke
2006-07-07 13:20   ` Joachim Henke
2006-07-08 13:16     ` R. Armiento
2006-07-08 15:01       ` [Qemu-devel] " Joachim Henke
2006-07-08 20:50         ` R. Armiento
2006-07-09  8:54           ` Joachim Henke
2006-07-09 13:20             ` R. Armiento
2006-07-09 11:30               ` Paul Brook
2006-07-09 15:25                 ` Jamie Lokier
2006-07-09 13:03               ` [Qemu-devel] 'monitor' and 'mwait' instruction Joachim Henke
2006-07-09 15:21               ` [Qemu-devel] add 'monitor' and 'mwait' instruction (update) Jamie Lokier
2006-07-09 15:11             ` Jamie Lokier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060709151149.GA31080@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.