qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Is the return address of get_page_addr_code guest physi


From: Laurent Desnogues
Subject: Re: [Qemu-devel] Is the return address of get_page_addr_code guest physical address?
Date: Sat, 11 Aug 2012 13:16:40 +0200

On Sat, Aug 11, 2012 at 5:41 AM, Steven <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]