1. 10 3月, 2011 2 次提交
    • D
      xen/gntdev,gntalloc: Remove unneeded VM flags · d79647ae
      Daniel De Graaf 提交于
      The only time when granted pages need to be treated specially is when
      using Xen's PTE modification for grant mappings owned by another domain
      (that is, only gntdev on PV guests).  Otherwise, the area does not
      require VM_DONTCOPY and VM_PFNMAP, since it can be accessed just like
      any other page of RAM.
      
      Since the vm_operations_struct close operations decrement reference
      counts, a corresponding open function that increments them is required
      now that it is possible to have multiple references to a single area.
      
      We are careful in the gntdev to check if we can remove those flags. The
      reason that we need to be careful in gntdev on PV guests is because we are
      not changing the PFN/MFN mapping on PV; instead, we change the application's
      page tables to point to the other domain's memory. This means that the vma
      cannot be copied without using another grant mapping hypercall; it also
      requires special handling on unmap, which is the reason for gntdev's
      dependency on the MMU notifier.
      
      For gntalloc, this is not a concern - the pages are owned by the domain
      using the gntalloc device, and can be mapped and unmapped in the same manner
      as any other page of memory.
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDaniel De Graaf <dgdegra@tycho.nsa.gov>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      [v2: Added in git commit "We are.." from email correspondence]
      d79647ae
    • I
      xen: gntdev: fix build warning · 38eaeb0f
      Ian Campbell 提交于
      addr is actually a virtual address so use an unsigned long. Fixes:
      
        CC      drivers/xen/gntdev.o
      drivers/xen/gntdev.c: In function 'map_grant_pages':
      drivers/xen/gntdev.c:268: warning: cast from pointer to integer of different size
      
      Reduce the scope of the variable at the same time.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      38eaeb0f
  2. 23 2月, 2011 2 次提交
  3. 15 2月, 2011 11 次提交
  4. 12 1月, 2011 6 次提交