[vbox-dev] How to access (read) GC physical page/addr?
Knut St. Osmundsen
bird at sun.com
Fri May 1 02:33:58 PDT 2009
On Apr 30, 2009, at 16:46, Micha Moffie wrote:
> I am trying to read a (guest) physical address (from withing the VMM).
> My guest is windows XP. Using a kernel debugger i am able to verify
> the address has valid content.
> I tried using PGMPhysRead to access the memory.
> While this worked for a low memory address, it doesn't work
> for 0x80561358 (__PsActiveProcessHead).
> Using PGMPhysIsGCPhysValid i can see the address is NOT valid.
> Why is this address not valid if it can be seen by the guest?
> Should i use a different API?
0x80561358 is a virtual address not a physical one. So you have to use
an API that takes an guest virtual address as input.
If you're reading from the emulation thread (EMT), you can use any
PGMPhysSimpleReadGCPtr or PGMPhysReadGCPtr depending on the semantics
you want. If you are reading from any other thread you have to do the
following sequence: PGMR3PhysGCPhys2CCPtrExternal, memcpy/whatever and
More information about the vbox-dev