1. 30 3月, 2017 3 次提交
  2. 28 2月, 2017 1 次提交
  3. 10 2月, 2017 2 次提交
    • J
      iommu: Add sysfs bindings for struct iommu_device · 39ab9555
      Joerg Roedel 提交于
      There is currently support for iommu sysfs bindings, but
      those need to be implemented in the IOMMU drivers. Add a
      more generic version of this by adding a struct device to
      struct iommu_device and use that for the sysfs bindings.
      
      Also convert the AMD and Intel IOMMU driver to make use of
      it.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      39ab9555
    • J
      iommu: Introduce new 'struct iommu_device' · b0119e87
      Joerg Roedel 提交于
      This struct represents one hardware iommu in the iommu core
      code. For now it only has the iommu-ops associated with it,
      but that will be extended soon.
      
      The register/unregister interface is also added, as well as
      making use of it in the Intel and AMD IOMMU drivers.
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      b0119e87
  4. 10 1月, 2017 1 次提交
  5. 21 12月, 2016 1 次提交
    • L
      ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users · 6b11d1d6
      Lv Zheng 提交于
      This patch removes the users of the deprectated APIs:
       acpi_get_table_with_size()
       early_acpi_os_unmap_memory()
      The following APIs should be used instead of:
       acpi_get_table()
       acpi_put_table()
      
      The deprecated APIs are invented to be a replacement of acpi_get_table()
      during the early stage so that the early mapped pointer will not be stored
      in ACPICA core and thus the late stage acpi_get_table() won't return a
      wrong pointer. The mapping size is returned just because it is required by
      early_acpi_os_unmap_memory() to unmap the pointer during early stage.
      
      But as the mapping size equals to the acpi_table_header.length
      (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when
      such a convenient result is returned, driver code will start to use it
      instead of accessing acpi_table_header to obtain the length.
      
      Thus this patch cleans up the drivers by replacing returned table size with
      acpi_table_header.length, and should be a no-op.
      Reported-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6b11d1d6
  6. 10 11月, 2016 1 次提交
  7. 19 9月, 2016 1 次提交
  8. 05 9月, 2016 4 次提交
  9. 07 7月, 2016 1 次提交
    • J
      iommu/amd: Fix unity mapping initialization race · 522e5cb7
      Joerg Roedel 提交于
      There is a race condition in the AMD IOMMU init code that
      causes requested unity mappings to be blocked by the IOMMU
      for a short period of time. This results on boot failures
      and IO_PAGE_FAULTs on some machines.
      
      Fix this by making sure the unity mappings are installed
      before all other DMA is blocked.
      
      Fixes: aafd8ba0 ('iommu/amd: Implement add_device and remove_device')
      Cc: stable@vger.kernel.org # v4.2+
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      522e5cb7
  10. 27 6月, 2016 1 次提交
  11. 07 4月, 2016 5 次提交
  12. 25 2月, 2016 2 次提交
    • J
      iommu/amd: Apply workaround for ATS write permission check · 358875fd
      Jay Cornwall 提交于
      The AMD Family 15h Models 30h-3Fh (Kaveri) BIOS and Kernel Developer's
      Guide omitted part of the BIOS IOMMU L2 register setup specification.
      Without this setup the IOMMU L2 does not fully respect write permissions
      when handling an ATS translation request.
      
      The IOMMU L2 will set PTE dirty bit when handling an ATS translation with
      write permission request, even when PTE RW bit is clear. This may occur by
      direct translation (which would cause a PPR) or by prefetch request from
      the ATC.
      
      This is observed in practice when the IOMMU L2 modifies a PTE which maps a
      pagecache page. The ext4 filesystem driver BUGs when asked to writeback
      these (non-modified) pages.
      
      Enable ATS write permission check in the Kaveri IOMMU L2 if BIOS has not.
      Signed-off-by: NJay Cornwall <jay@jcornwall.me>
      Cc: <stable@vger.kernel.org> # v3.19+
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      358875fd
    • S
      iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered · 38e45d02
      Suravee Suthikulpanit 提交于
      The setup code for the performance counters in the AMD IOMMU driver
      tests whether the counters can be written. It tests to setup a counter
      for device 00:00.0, which fails on systems where this particular device
      is not covered by the IOMMU.
      
      Fix this by not relying on device 00:00.0 but only on the IOMMU being
      present.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      38e45d02
  13. 21 10月, 2015 5 次提交
  14. 09 10月, 2015 1 次提交
  15. 04 10月, 2015 1 次提交
  16. 29 9月, 2015 1 次提交
  17. 24 9月, 2015 1 次提交
  18. 14 8月, 2015 1 次提交
  19. 30 7月, 2015 1 次提交
  20. 11 6月, 2015 2 次提交
  21. 24 4月, 2015 1 次提交
  22. 04 2月, 2015 1 次提交
  23. 23 1月, 2015 1 次提交
    • T
      iommu/amd: Fix irq remapping detection logic · 3f4cb7c0
      Thomas Gleixner 提交于
      Commit 7fa1c842 "iommu/irq_remapping: Change variable
      disable_irq_remap to be static" returns unconditionally success from
      the irq remapping prepare callback if the iommu can be initialized.
      
      The change assumed that iommu_go_to_state(IOMMU_ACPI_FINISHED) returns
      a failure if irq remapping is not enabled, but thats not the case.
      
      The function returns success when the iommu is initialized to the
      point which is required for remapping to work. The actual state of the
      irq remapping feature is reflected in the status variable
      amd_iommu_irq_remap, which is not considered in the return value.
      
      The fix is simple: If the iommu_go_to_state() returns success,
      evaluate the remapping state amd_iommu_irq_remap and reflect it in the
      return value.
      
      Fixes: 7fa1c842 iommu/irq_remapping: Change variable disable_irq_remap to be static
      Reported-and-tested-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      3f4cb7c0
  24. 15 1月, 2015 1 次提交