|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] How to convert from virtual to machine address (any macros?)
Hi,
I browsed the archives, but could not find an example on this. What are the macros for converting a virtual address to machine address on Xen in x86 architectures?
For example, on a non-virtualized dom0, the following code works:
static int virt_to_phys (struct task_struct *p, unsigned long addr) { // (...) ret = get_user_pages (p, p->mm, addr, 1, 1, 1, &page, &vma); if (ret <= 0) { // do something }
offset = addr & (PAGE_SIZE - 1); maddr = kmap (page); return (int) maddr + offset; }
However, this mapping seems incorrect on the same dom0 on top of Xen. Therefore, I would like to know if there's an example (or pointers to macros) on how to do the virtual->pseudo-physical->machine address mapping on Xen.
Thanks and regards, Joana
-- Joana M. F. da Trindade Visiting Scholar Center for Reliable and High-Performance Computing University of Illinois at Urbana-Champaign
Personal Homepage: http://joanatrindade.wikidot.com
LinkedIn: http://www.linkedin.com/in/joanatrindade
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] How to convert from virtual to machine address (any macros?),
Joana M. F. Trindade <=
|
|
|
|
|