|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Mapping another domain's user memory
Hello,
Is it possible to map another domain's user-level memory into a
different domain's kernel? (For clarity, let the source domain be the
one with the user-space pages that a destination domain wants to write
to.)
I tried to do that by first getting a grant for the user-space memory
in the source domain as follows:
page_start = user_buf;
buffer_mfn = virt_to_mfn(page_start);
gnttab_grant_foreign_access_ref(grant_ref, info->dev->otherend_id,
buffer_mfn, 0);
But the virt_to_mfn call asserted, in include/asm-x86_64/mach-xen/asm/
maddr.h:pfn_to_mfn.
The assertion that failed was: BUG_ON(end_pfn && pfn >= end_pfn);
So a few questions:
1) is it even possible to map a domain's user-space page into another
domain?
2) for the above code snippet to work, must I install some mappings in
the source domain first?
3) does the blktap driver do something similar? I tried looking at the
blktap driver, because it looked like it might help. But I'm new to
the Xen memory management code so it was a bit difficult to follow.
4) I looked at fs/filemap.c:file_read_actor and how it calls kmap
before calling __copy_to_user. Would calling kmap help?
__copy_to_user is a bit of a mystery to me (granted, no pun intended,
I didn't dig deep enough into the assembly code to understand what
it's doing.)
5) any other suggestions?
Thanks,
Mike
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Mapping another domain's user memory,
Michael Abd-El-Malek <=
|
|
|
|
|