[vbox-dev] (no subject)

mgofman1 at binghamton.edu mgofman1 at binghamton.edu
Sat Feb 13 18:14:11 PST 2010

Thanks for the reply! 

I tried using PGMPhysGCPtr2GCPhys, but the returned value always seems to yield an error i.e. RT_SUCCESS(rc) never holds. I do not see what I am doing wrong.

Also, I tried using PGMR3DbgWriteGCPtr and I also have the same problem. Perhaps its because of the flags I am passing. Which flags should I pass to this function?

Could you please provide a working example if possible on how to properly call these functions?

Thanks for your helpful advice!

On Sat, Feb 13, 2010 at 3:25 PM, Knut St. Osmundsen <bird at sun.com> wrote:
> On Feb 13, 2010, at 5:46 AM, mgofman1 at binghamton.edu wrote:
>> Greetings,
>> I have a question regarding how to translate between different types of memory addresses in VirtualBox. I am looking for ways to translate from:
>> * Guest Virtual Address ---> Guest Physical Address
> -> PGMPhysGCPtr2GCPhys
>> * Guest Physical ---> Guest Virtual
> -> No API for this.
> The simple implementation of this translation would be to scan all known guest page tables, which would probably be extremely slow. We could maybe speed it up a bit by first checking the shadowed page table backrefs for the guest physical page, but the shadowed page tables lack information about their relation to virtual addresses (they can be mapped into several paging hierarchies) and the information we find there might easily be outdated or for a different memory context. This

More information about the vbox-dev mailing list