1. 14 Feb, 2017 1 commit
  2. 26 Dec, 2016 1 commit
  3. 24 Dec, 2016 1 commit
  4. 21 Nov, 2016 1 commit
  5. 06 Jul, 2016 2 commits
  6. 21 Dec, 2015 1 commit
  7. 24 Apr, 2014 1 commit
    • Ian Campbell's avatar
      arm: xen: implement multicall hypercall support. · 5e40704e
      Ian Campbell authored
      As part of this make the usual change to xen_ulong_t in place of unsigned long.
      This change has no impact on x86.
      The Linux definition of struct multicall_entry.result differs from the Xen
      definition, I think for good reasons, and used a long rather than an unsigned
      long. Therefore introduce a xen_long_t, which is a long on x86 architectures
      and a signed 64-bit integer on ARM.
      Use uint32_t nr_calls on x86 for consistency with the ARM definition.
      Build tested on amd64 and i386 builds. Runtime tested on ARM.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
  8. 10 Oct, 2013 1 commit
    • Stefano Stabellini's avatar
      xen/arm,arm64: enable SWIOTLB_XEN · 83862ccf
      Stefano Stabellini authored
      Xen on arm and arm64 needs SWIOTLB_XEN: when running on Xen we need to
      program the hardware with mfns rather than pfns for dma addresses.
      Remove SWIOTLB_XEN dependency on X86 and PCI and make XEN select
      SWIOTLB_XEN on arm and arm64.
      At the moment always rely on swiotlb-xen, but when Xen starts supporting
      hardware IOMMUs we'll be able to avoid it conditionally on the presence
      of an IOMMU on the platform.
      Implement xen_create_contiguous_region on arm and arm64: for the moment
      we assume that dom0 has been mapped 1:1 (physical addresses == machine
      addresses) therefore we don't need to call XENMEM_exchange. Simply
      return the physical address as dma address.
      Initialize the xen-swiotlb from xen_early_init (before the native
      dma_ops are initialized), set xen_dma_ops to &xen_swiotlb_dma_ops.
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Changes in v8:
      - assume dom0 is mapped 1:1, no need to call XENMEM_exchange.
      Changes in v7:
      - call __set_phys_to_machine_multi from xen_create_contiguous_region and
      xen_destroy_contiguous_region to update the P2M;
      - don't call XENMEM_unpin, it has been removed;
      - call XENMEM_exchange instead of XENMEM_exchange_and_pin;
      - set nr_exchanged to 0 before calling the hypercall.
      Changes in v6:
      - introduce and export xen_dma_ops;
      - call xen_mm_init from as arch_initcall.
      Changes in v4:
      - remove redefinition of DMA_ERROR_CODE;
      - update the code to use XENMEM_exchange_and_pin and XENMEM_unpin;
      - add a note about hardware IOMMU in the commit message.
      Changes in v3:
      - code style changes;
      - warn on XENMEM_put_dma_buf failures.
  9. 17 Oct, 2013 1 commit
    • Stefano Stabellini's avatar
      arm/xen,arm64/xen: introduce p2m · 4a19138c
      Stefano Stabellini authored
      Introduce physical to machine and machine to physical tracking
      mechanisms based on rbtrees for arm/xen and arm64/xen.
      We need it because any guests on ARM are an autotranslate guests,
      therefore a physical address is potentially different from a machine
      address. When programming a device to do DMA, we need to be
      extra-careful to use machine addresses rather than physical addresses to
      program the device. Therefore we need to know the physical to machine
      For the moment we assume that dom0 starts with a 1:1 physical to machine
      mapping, in other words physical addresses correspond to machine
      addresses. However when mapping a foreign grant reference, obviously the
      1:1 model doesn't work anymore. So at the very least we need to be able
      to track grant mappings.
      We need locking to protect accesses to the two trees.
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Changes in v8:
      - move pfn_to_mfn and mfn_to_pfn to page.h as static inline functions;
      - no need to walk the tree if phys_to_mach.rb_node is NULL;
      - correctly handle multipage p2m entries;
      - substitute the spin_lock with a rwlock.
  10. 04 Jul, 2013 1 commit
  11. 07 Jun, 2013 1 commit