LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Convert guest logical address to host physical address (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/convert-guest-logical-address-to-host-physical-address-906877/)

hmd429 10-07-2011 02:37 AM

Convert guest logical address to host physical address
 
Hi Everybody,
I need to get the task_struct's address of current process in a virtual machine monitor (such as Bitvisor).
Because of, in kernel mode, each process has an 8kb-sized (or 4kb) memory area which contains a stack starts at the beginning of the area (with highest address) and a struct named "thread_info" start at the end. An operation: esp & 0xffffe000 (esp & 0xfffff000 for 4Kb stack size) helps bring out the address of "thread_info". Since the task_struct's address can be calculated from the first field of "thread_info", I want to convert guest virtual address of thread_info struct to host physical address i hyoervisor level as below:
thread_info_guest_logical = VMCS.rsp & 0xffffe000
thread_info_host_logical =guest_logic_to_host_physic(....);
I need a proper C function such as guest_logic_to_host_physic in the Intel platform.

Anybody know about this or have suggestion ?

Many thanks.

colucix 10-07-2011 03:44 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of http://www.linuxquestions.org/questi...ddress-906875/.


All times are GMT -5. The time now is 12:07 PM.