[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] How to get guestOS's information
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] How to get guestOS's information |
Date: |
Thu, 26 Oct 2006 23:08:55 +0100 |
User-agent: |
Mutt/1.4.1i |
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