|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 0/3] [RFC] User-space grant table device
On Wed, Mar 21, 2007 at 11:29:29AM +0000, Derek Murray wrote:
> blktap appears to map each grant into kernel space and, when not
> using auto-translated mode, into user space as well. If it is using
> auto-translated mode, then the grant is only mapped into the kernel.
When auto translate physmap mode, grant table works based on
pseudo physical address space. not virtual address space.
Please see gnttab_set_map/unmap_op() using __pa().
It is up to the guest kernel to map the pseudo physical address
to kernel/user virtual address space using kernel functionality.
Given that Linux adopts 1:1 mapping between pseudo physical address
space and kernel virtual address space, there is
> Am I correct in thinking that the use of the VM_FOREIGN flag, plus
> the use of vm_private_data to store an array of struct page pointers,
> enables the pages to be mapped into user space using get_user_pages()
> (which is called by make_pages_present(), which is called by
> do_mmap_pgoff())? Or is it the call to vm_insert_page()?
Both setting vm_private_data and calling vm_insert_page are necessary.
vm_insert_page() is the counter part of GNTMAP_application_map for
auto translated phymap mode.
I may be worng because I haven't taken closer look of your code, though.
> I'll have a try at adding the code to work in these cases, though I
> would appreciate your feedback on whether the changes are correct.
I'm willing to review/test.
Do you have any testing program? Can you provide it?
I may need it when test.
--
yamahata
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|