[vbox-dev] Translating different types of memory addresses in virtual box
Knut St. Osmundsen
bird at sun.com
Sun Feb 14 10:42:37 PST 2010
On Feb 14, 2010, at 17:49, mgofman1 at binghamton.edu wrote:
> I analysed the return codes; they were either -1004
> (PAGE_TABLE_NOT_FOUND) or -31 (PAGE_NOT_FOUND). I guess it was the
> addresses that I supplied.
> I tried converting all virtual addresses from 0 to 10000000000 to
> physical and got valid conversions for many of them (while many
> others still returned error codes). So I think the issue is as I
> said the addresses that I supplied.
> So what I am trying to understand is the relationship between the
> VirtualBox virtual addresses and guest virtual addresses. I.e.
> suppose that in the guest I get the virtual address xxxx from proc
> file system or what not. Now, in the VirtualBox, if I use
> PGMPhysGCPtr2GCPhys function to convert address xxxx to physical, it
> should work, and the physical address should correspond to the
> actual guest physical address. So reading something from this
> physical address inside the guest or in VirtualBox should give the
> same result.
> When I try to do the above, ie get the virtual address inside the
> guest from proc file system, and try to translate that address to
> physical in VirtualBox using PGMPhysGCPtr2GCPhys it gives me
> PAGE_TABLE_NOT_FOUND. So it seems that there is not a one-to-one
> relationship between the virtual addresses which guest sees and what
> VirtualBox sees.
> Is my understanding of the above correct? Or I am I doing something
My guess is that you are disregarding the memory context of the guest
Kind regards / Mit freundlichen Gruessen / Vennlig hilsen,
Sun Microsystems GmbH Knut St. Osmundsen
Werkstrasse 24 Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:bird at sun.com
Sitz der Gesellschaft: Sun Microsystems GmbH,
Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Gesch?ftsf?hrer: Thomas Schroeder, Wolfgang Engels
Vorsitzender des Aufsichtsrates: Martin Haering
More information about the vbox-dev