1. 23 10月, 2015 1 次提交
  2. 11 8月, 2014 1 次提交
  3. 30 7月, 2014 1 次提交
    • D
      x86/xen: safely map and unmap grant frames when in atomic context · b7dd0e35
      David Vrabel 提交于
      arch_gnttab_map_frames() and arch_gnttab_unmap_frames() are called in
      atomic context but were calling alloc_vm_area() which might sleep.
      
      Also, if a driver attempts to allocate a grant ref from an interrupt
      and the table needs expanding, then the CPU may already by in lazy MMU
      mode and apply_to_page_range() will BUG when it tries to re-enable
      lazy MMU mode.
      
      These two functions are only used in PV guests.
      
      Introduce arch_gnttab_init() to allocates the virtual address space in
      advance.
      
      Avoid the use of apply_to_page_range() by using saving and using the
      array of PTE addresses from the alloc_vm_area() call (which ensures
      that the required page tables are pre-allocated).
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      b7dd0e35
  4. 15 7月, 2014 2 次提交
  5. 31 1月, 2014 1 次提交
  6. 07 1月, 2014 1 次提交
  7. 06 1月, 2014 1 次提交
    • K
      xen/pvh: Piggyback on PVHVM for grant driver (v4) · 6926f6d6
      Konrad Rzeszutek Wilk 提交于
      In PVH the shared grant frame is the PFN and not MFN,
      hence its mapped via the same code path as HVM.
      
      The allocation of the grant frame is done differently - we
      do not use the early platform-pci driver and have an
      ioremap area - instead we use balloon memory and stitch
      all of the non-contingous pages in a virtualized area.
      
      That means when we call the hypervisor to replace the GMFN
      with a XENMAPSPACE_grant_table type, we need to lookup the
      old PFN for every iteration instead of assuming a flat
      contingous PFN allocation.
      
      Lastly, we only use v1 for grants. This is because PVHVM
      is not able to use v2 due to no XENMEM_add_to_physmap
      calls on the error status page (see commit
      69e8f430
       xen/granttable: Disable grant v2 for HVM domains.)
      
      Until that is implemented this workaround has to
      be in place.
      
      Also per suggestions by Stefano utilize the PVHVM paths
      as they share common functionality.
      
      v2 of this patch moves most of the PVH code out in the
      arch/x86/xen/grant-table driver and touches only minimally
      the generic driver.
      
      v3, v4: fixes us some of the code due to earlier patches.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      6926f6d6
  8. 22 11月, 2011 2 次提交
    • A
      xen/granttable: Grant tables V2 implementation · 85ff6acb
      Annie Li 提交于
      Receiver-side copying of packets is based on this implementation, it gives
      better performance and better CPU accounting. It totally supports three types:
      full-page, sub-page and transitive grants.
      
      However this patch does not cover sub-page and transitive grants, it mainly
      focus on Full-page part and implements grant table V2 interfaces corresponding
      to what already exists in grant table V1, such as: grant table V2
      initialization, mapping, releasing and exported interfaces.
      
      Each guest can only supports one type of grant table type, every entry in grant
      table should be the same version. It is necessary to set V1 or V2 version before
      initializing the grant table.
      
      Grant table exported interfaces of V2 are same with those of V1, Xen is
      responsible to judge what grant table version guests are using in every grant
      operation.
      
      V2 fulfills the same role of V1, and it is totally backwards compitable with V1.
      If dom0 support grant table V2, the guests runing on it can run with either V1
      or V2.
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NAnnie Li <annie.li@oracle.com>
      [v1: Modified alloc_vm_area call (new parameters), indentation, and cleanpatch
           warnings]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      85ff6acb
    • A
      xen/granttable: Introducing grant table V2 stucture · 0f9f5a95
      Annie Li 提交于
      This patch introduces new structures of grant table V2, grant table V2 is an
      extension from V1. Grant table is shared between guest and Xen, and Xen is
      responsible to do corresponding work for grant operations, such as: figure
      out guest's grant table version, perform different actions based on
      different grant table version, etc. Although full-page structure of V2
      is different from V1, it play the same role as V1.
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NAnnie Li <annie.li@oracle.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      0f9f5a95
  9. 17 11月, 2011 1 次提交
  10. 30 9月, 2011 1 次提交
  11. 25 4月, 2008 1 次提交