1. 14 8月, 2015 1 次提交
  2. 30 7月, 2015 1 次提交
  3. 11 6月, 2015 2 次提交
  4. 24 4月, 2015 1 次提交
  5. 04 2月, 2015 1 次提交
  6. 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
  7. 15 1月, 2015 3 次提交
  8. 26 9月, 2014 1 次提交
  9. 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
  10. 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
  11. 24 3月, 2014 1 次提交
  12. 07 12月, 2013 1 次提交
    • L
      ACPI: Clean up inclusions of ACPI header files · 8b48463f
      Lv Zheng 提交于
      Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
      <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
      inclusions and remove some inclusions of those files that aren't
      necessary.
      
      First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
      should not be included directly from any files that are built for
      CONFIG_ACPI unset, because that generally leads to build warnings about
      undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
      <linux/acpi.h> includes those files and for CONFIG_ACPI unset it
      provides stub ACPI symbols to be used in that case.
      
      Second, there are ordering dependencies between those files that always
      have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
      prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
      latter depends on are always there.  And <acpi/acpi.h> which provides
      basic ACPICA type declarations should always be included prior to any other
      ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
      <linux/acpi.h> as appropriate.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8b48463f
  13. 14 8月, 2013 1 次提交
  14. 19 6月, 2013 1 次提交
  15. 23 4月, 2013 2 次提交
    • W
      iommu/amd: fix error return code in early_amd_iommu_init() · 83ed9c13
      Wei Yongjun 提交于
      Fix to return -ENOMEM int the memory alloc error handling
      case instead of 0, as done elsewhere in this function.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      83ed9c13
    • S
      iommu/AMD: Per-thread IOMMU Interrupt Handling · 3f398bc7
      Suravee Suthikulpanit 提交于
      In the current interrupt handling scheme, there are as many threads as
      the number of IOMMUs. Each thread is created and assigned to an IOMMU at
      the time of registering interrupt handlers (request_threaded_irq).
      When an IOMMU HW generates an interrupt, the irq handler (top half) wakes up
      the corresponding thread to process event and PPR logs of all IOMMUs
      starting from the 1st IOMMU.
      
      In the system with multiple IOMMU,this handling scheme complicates the
      synchronization of the IOMMU data structures and status registers as
      there could be multiple threads competing for the same IOMMU while
      the other IOMMU could be left unhandled.
      
      To simplify, this patch is proposing a different interrupt handling scheme
      by having each thread only managing interrupts of the corresponding IOMMU.
      This can be achieved by passing the struct amd_iommu when registering the
      interrupt handlers. This structure is unique for each IOMMU and can be used
      by the bottom half thread to identify the IOMMU to be handled instead
      of calling for_each_iommu.  Besides this also eliminate the needs to lock
      the IOMMU for processing event and PPR logs.
      Signed-off-by: NSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      3f398bc7
  16. 20 4月, 2013 5 次提交
  17. 27 3月, 2013 2 次提交
  18. 10 3月, 2013 1 次提交
    • N
      amd_iommu_init: remove __init from amd_iommu_erratum_746_workaround · e2f1a3bd
      Nikola Pajkovsky 提交于
      commit 318fe782 ("IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround")
      added amd_iommu_erratum_746_workaround and it's marked as __init, which is wrong
      
      WARNING: drivers/iommu/built-in.o(.text+0x639c): Section mismatch in reference from the function iommu_init_pci() to the function .init.text:amd_iommu_erratum_746_workaround()
      The function iommu_init_pci() references
      the function __init amd_iommu_erratum_746_workaround().
      This is often because iommu_init_pci lacks a __init
      annotation or the annotation of amd_iommu_erratum_746_workaround is wrong.
      Signed-off-by: NNikola Pajkovsky <npajkovs@redhat.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      e2f1a3bd
  19. 08 2月, 2013 1 次提交
    • J
      iommu/amd: Initialize device table after dma_ops · f528d980
      Joerg Roedel 提交于
      When dma_ops are initialized the unity mappings are
      created. The init_device_table_dma() function makes sure DMA
      from all devices is blocked by default. This opens a short
      window in time where DMA to unity mapped regions is blocked
      by the IOMMU. Make sure this does not happen by initializing
      the device table after dma_ops.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      f528d980
  20. 28 1月, 2013 1 次提交
  21. 16 10月, 2012 1 次提交
  22. 28 9月, 2012 10 次提交