On Sat, Aug 11, 2012 at 5:41 AM, Steven <wangwangk...@gmail.com> wrote:
[...]
> I want to get the guest physical address of a pc. I note the part of
> the function cpu_x86_handle_mmu_fault will do something like page
> walking to convert a pc to its guest physical address. I think this is
> the guest physical address I need. However, there is no other function
> available to do this page walking.
> So I am thinking add a function to do the conversion.

If you want the translation of any guest virtual address to guest physical
address then cpu_x86_handle_mmu_fault is close to what you want.  Of
course you'd have to rewrite it as you probably don't want your function
to change the CPU env.

Perhaps cpu_get_phys_page_debug is even closer to what you need,
but I'm not familiar enough with x86 to say for sure.


Laurent

Reply via email to