1. 10 1月, 2017 1 次提交
  2. 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
  3. 10 11月, 2016 1 次提交
  4. 19 9月, 2016 1 次提交
  5. 05 9月, 2016 4 次提交
  6. 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
  7. 27 6月, 2016 1 次提交
  8. 07 4月, 2016 5 次提交
  9. 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
  10. 21 10月, 2015 5 次提交
  11. 09 10月, 2015 1 次提交
  12. 04 10月, 2015 1 次提交
  13. 29 9月, 2015 1 次提交
  14. 24 9月, 2015 1 次提交
  15. 14 8月, 2015 1 次提交
  16. 30 7月, 2015 1 次提交
  17. 11 6月, 2015 2 次提交
  18. 24 4月, 2015 1 次提交
  19. 04 2月, 2015 1 次提交
  20. 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
  21. 15 1月, 2015 3 次提交
  22. 26 9月, 2014 1 次提交
  23. 04 7月, 2014 1 次提交
    • A
      iommu/amd: Add sysfs support · 066f2e98
      Alex Williamson 提交于
      AMD-Vi support for IOMMU sysfs.  This allows us to associate devices
      with a specific IOMMU device and examine the capabilities and features
      of that IOMMU.  The AMD IOMMU is hosted on and actual PCI device, so
      we make that device the parent for the IOMMU class device.  This
      initial implementaiton exposes only the capability header and extended
      features register for the IOMMU.
      
      # find /sys | grep ivhd
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:00.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:02.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:04.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:09.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:11.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:12.0
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:12.2
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/devices/0000:00:13.0
      ...
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/power
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/power/control
      ...
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/device
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/subsystem
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/amd-iommu
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/amd-iommu/cap
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/amd-iommu/features
      /sys/devices/pci0000:00/0000:00:00.2/iommu/ivhd0/uevent
      /sys/class/iommu/ivhd0
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      066f2e98
  24. 13 5月, 2014 1 次提交
    • S
      iommu/amd: fix enabling exclusion range for an exact device · 2c16c9fd
      Su Friendy 提交于
      set_device_exclusion_range(u16 devid, struct ivmd_header *m) enables
      exclusion range for ONE device. IOMMU does not translate the access
      to the exclusion range from the device.
      
      The device is specified by input argument 'devid'. But 'devid' is not
      passed to the actual set function set_dev_entry_bit(), instead
      'm->devid' is passed. 'm->devid' does not specify the exact device
      which needs enable the exclusion range. 'm->devid' represents DeviceID
      field of IVMD, which has different meaning depends on IVMD type.
      
      The caller init_exclusion_range() sets 'devid' for ONE device. When
      m->type is equal to ACPI_IVMD_TYPE_ALL or ACPI_IVMD_TYPE_RANGE,
      'm->devid' is not equal to 'devid'.
      
      This patch fixes 'm->devid' to 'devid'.
      Signed-off-by: NSu Friendy <friendy.su@sony.com.cn>
      Signed-off-by: NTamori Masahiro <Masahiro.Tamori@jp.sony.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      2c16c9fd
  25. 24 3月, 2014 1 次提交