qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] How to get guestOS's information
Date: Thu, 26 Oct 2006 23:08:55 +0100	[thread overview]
Message-ID: <20061026220855.GA7264@mail.shareable.org> (raw)
In-Reply-To: <1161900005.29751.60.camel@localhost.localdomain>

maestro wrote:
> You might want to consider useing the Page Directory Base Register (PDBR
> aka cr3 or in qemu-x86 env->cr[3]) to idenify differnet processes. afaik
> it is then OS-dependant how to get the corresponding PID. I did this for
> windows and i assume it's a lot easier to do the same for linux/*BSD (as
> the source is available). Since you probably will need to check for the
> current process quite often, the shorter access times for this
> information might come in handy.

Good idea.

However, on Linux cr3 is not updated for every process.  Specifically,
it is not updated for kernel threads which don't have any user-space
mappings of their own.  This is to avoid unnecessary TLB flushes.

-- Jamie

      reply	other threads:[~2006-10-26 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26  7:23 [Qemu-devel] How to get guestOS's information KazuyaMatsunaga
2006-10-26 16:21 ` Rob Landley
2006-10-26 17:53 ` andrzej zaborowski
2006-10-26 18:06   ` andrzej zaborowski
2006-10-26 22:00 ` maestro
2006-10-26 22:08   ` 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=20061026220855.GA7264@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).