On Thursday 19 May 2005 00:34, Young Koh wrote:
> Ok, let me have an example.
>
> suppose a user argument has virtual address 0xa0, corresponding UML
> physical address 0xb0, and real physical address 0x10. so, when the
> user process tries to access 0xa0 for the first time, the UML kernel
> should let host kernel know there will be 0xa0 -> 0x10 mapping.
Yes, and we only need to know the 0xa0 -> 0xb0 mapping... We currently use a 
2/3-level page table mechanism to do this lookup, to answer the latter 
question, even if we could choice any lookup mechanism, even a hash table if 
there were the need.

Also note that these numbers are unrealistic since we map one page (4k) at a 
time.
> how 
> does the UML kernel make another process's address map to the same
> physical page it has?
UML physical address are actually the offsets inside the memory backing file. 
Then the guest has simply to execute an mmap from this file with the "Uml 
physical address" as the offset; in TT mode it's done directly, in SKAS3 mode 
this is done by writing a MM_MMAP request into host's /proc/mm, in SKAS0 this 
is executed by the stub calling mmap() directly.

> and how does the UML kernel keep track of 0xa0 
> -> 0xb0 mapping? maybe the same page table mechanism as host Linux? (i
> guess so, though)

-- 
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to