1. 30 6月, 2015 1 次提交
  2. 11 6月, 2015 2 次提交
  3. 09 6月, 2015 7 次提交
  4. 05 6月, 2015 5 次提交
  5. 29 5月, 2015 1 次提交
  6. 31 3月, 2015 4 次提交
  7. 04 2月, 2015 1 次提交
  8. 26 1月, 2015 1 次提交
  9. 19 1月, 2015 2 次提交
  10. 02 12月, 2014 2 次提交
  11. 04 11月, 2014 3 次提交
    • H
      iommu: Improve error handling when setting bus iommu · d7da6bdc
      Heiko Stübner 提交于
      When some part of bus_set_iommu fails it should undo any made changes
      and not simply leave everything as is.
      
      This includes unregistering the bus notifier in iommu_bus_init when
      add_iommu_group fails and also setting the bus->iommu_ops back to NULL.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      d7da6bdc
    • J
      iommu: Do more input validation in iommu_map_sg() · 38ec010d
      Joerg Roedel 提交于
      The IOMMU-API works on page boundarys, unlike the DMA-API
      which can work with sub-page buffers. The sg->offset
      field does not make sense on the IOMMU level, so force it to
      be 0. Do some error-path consolidation while at it.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      38ec010d
    • O
      iommu: Add iommu_map_sg() function · 315786eb
      Olav Haugan 提交于
      Mapping and unmapping are more often than not in the critical path.
      map_sg allows IOMMU driver implementations to optimize the process
      of mapping buffers into the IOMMU page tables.
      
      Instead of mapping a buffer one page at a time and requiring potentially
      expensive TLB operations for each page, this function allows the driver
      to map all pages in one go and defer TLB maintenance until after all
      pages have been mapped.
      
      Additionally, the mapping operation would be faster in general since
      clients does not have to keep calling map API over and over again for
      each physically contiguous chunk of memory that needs to be mapped to a
      virtually contiguous region.
      Signed-off-by: NOlav Haugan <ohaugan@codeaurora.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      315786eb
  12. 25 9月, 2014 5 次提交
    • M
      iommu: Fix bus notifier breakage · fb3e3065
      Mark Salter 提交于
      iommu_bus_init() registers a bus notifier on the given bus by using
      a statically defined notifier block:
      
        static struct notifier_block iommu_bus_nb = {
                .notifier_call = iommu_bus_notifier,
        };
      
      This same notifier block is used for all busses. This causes a
      problem for notifiers registered after iommu has registered this
      callback on multiple busses. The problem is that a subsequent
      notifier being registered on a bus which has this iommu notifier
      will also get linked in to the notifier list of all other busses
      which have this iommu notifier.
      
      This patch fixes this by allocating the notifier_block at runtime.
      Some error checking is also added to catch any allocation failure
      or notifier registration error.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      fb3e3065
    • A
      iommu: Rework iommu_group_get_for_pci_dev() · f096c061
      Alex Williamson 提交于
      It turns out that our assumption that aliases are always to the same
      slot isn't true.  One particular platform reports an IVRS alias of the
      SATA controller (00:11.0) for the legacy IDE controller (00:14.1).
      When we hit this, we attempt to use a single IOMMU group for
      everything on the same bus, which in this case is the root complex.
      We already have multiple groups defined for the root complex by this
      point, resulting in multiple WARN_ON hits.
      
      This patch makes these sorts of aliases work again with IOMMU groups
      by reworking how we search through the PCI address space to find
      existing groups.  This should also now handle looped dependencies and
      all sorts of crazy inter-dependencies that we'll likely never see.
      
      The recursion used here should never be very deep.  It's unlikely to
      have individual aliases and only theoretical that we'd ever see a
      chain where one alias causes us to search through to yet another
      alias.  We're also only dealing with PCIe device on a single bus,
      which means we'll typically only see multiple slots in use on the root
      complex.  Loops are also a theoretically possibility, which I've
      tested using fake DMA alias quirks and prevent from causing problems
      using a bitmap of the devfn space that's been visited.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: stable@vger.kernel.org # 3.17
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      f096c061
    • J
      iommu: Remove iommu_domain_has_cap() API function · 24278a24
      Joerg Roedel 提交于
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      24278a24
    • J
      iommu: Introduce iommu_capable API function · 3c0e0ca0
      Joerg Roedel 提交于
      This function will replace the current iommu_domain_has_cap
      function and clean up the interface while at it.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      3c0e0ca0
    • J
      iommu: Convert iommu-caps from define to enum · 1aed0748
      Joerg Roedel 提交于
      Allow compile-time type-checking.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      1aed0748
  13. 26 8月, 2014 1 次提交
  14. 19 8月, 2014 1 次提交
  15. 07 7月, 2014 1 次提交
  16. 04 7月, 2014 1 次提交
  17. 24 9月, 2013 2 次提交