Results 1 to 2 of 2
Hi, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-07-2011 #1
- Join Date
- Oct 2011
Convert guest logical address to host physical address
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
I need a proper C function such as guest_logic_to_host_physic in the Intel platform.
Anybody know about this or have suggestion ?
- 11-26-2011 #2
- Join Date
- Nov 2011
First, guest does not have any information whether it is running on hypervisor or not. You can not get details about a guest inside a guest unless, you have implemented some special interface (virtual device) to get details from hypervisor (e.g. command relay) or some mechanism on top of VMCALL instruction.
Last edited by oz; 11-26-2011 at 01:37 PM. Reason: spam removal