LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 10-07-2011, 03:35 AM   #1
hmd429
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting virtual address to physical address in the kernel DBQ Programming 0 02-07-2010 07:30 PM
how to translate virtual address to physical address in linux application saurin Programming 1 11-18-2009 10:05 PM
Examples about Logical,Linear and Physical address in Linux Memory Addressing muralis Linux - Kernel 5 08-04-2007 09:18 PM
how to find physical address of kernel virtual address kushneeraj Programming 0 10-20-2006 08:29 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-25-2006 12:13 AM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration