LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 02: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



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 06:30 PM
how to translate virtual address to physical address in linux application saurin Programming 1 11-18-2009 09:05 PM
Examples about Logical,Linear and Physical address in Linux Memory Addressing muralis Linux - Kernel 5 08-04-2007 08:18 PM
how to find physical address of kernel virtual address kushneeraj Programming 0 10-20-2006 07:29 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration