|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
Re: [Xen-devel] Grant Tables  & mm.c
 
On 7 Jul 2007, at 14:44, Koripella Srinivas wrote:
 I was looking at the user space grant tables but i did not find any  
code calling the function
"remap_pfn_range" to map the kmalloc ed allocated memory into user  
space.
What could be the reason?? Or am i missing something
  
 The mapping takes place in drivers/xen/gntdev/gntdev.c, in the  
function gntdev_mmap(). In the normal case (no shadow page tables),  
the page is mapped into user space by calling  
HYPERVISOR_grant_table_op, with the GNTTABOP_map_grant_ref operation,  
and (amongst other things) a pointer to the page table entry to be  
rewritten. Therefore, it is not necessary to call remap_pfn_range().
 I'm not sure what you mean by "the kmalloc ed allocated memory". The  
memory is allocated by another domain, and inserted in the grant  
table. In the kernel that carries out the mapping, kmalloc is used  
only for allocating kernel-private data structures.
Regards,
Derek Murray.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    | 
  
  
    |   | 
    |