1. 25 7月, 2017 1 次提交
  2. 28 6月, 2017 3 次提交
  3. 23 6月, 2017 2 次提交
  4. 22 6月, 2017 1 次提交
  5. 16 6月, 2017 1 次提交
  6. 08 6月, 2017 9 次提交
  7. 30 5月, 2017 2 次提交
  8. 30 3月, 2017 1 次提交
  9. 22 3月, 2017 1 次提交
    • R
      iommu: Disambiguate MSI region types · 9d3a4de4
      Robin Murphy 提交于
      The introduction of reserved regions has left a couple of rough edges
      which we could do with sorting out sooner rather than later. Since we
      are not yet addressing the potential dynamic aspect of software-managed
      reservations and presenting them at arbitrary fixed addresses, it is
      incongruous that we end up displaying hardware vs. software-managed MSI
      regions to userspace differently, especially since ARM-based systems may
      actually require one or the other, or even potentially both at once,
      (which iommu-dma currently has no hope of dealing with at all). Let's
      resolve the former user-visible inconsistency ASAP before the ABI has
      been baked into a kernel release, in a way that also lays the groundwork
      for the latter shortcoming to be addressed by follow-up patches.
      
      For clarity, rename the software-managed type to IOMMU_RESV_SW_MSI, use
      IOMMU_RESV_MSI to describe the hardware type, and document everything a
      little bit. Since the x86 MSI remapping hardware falls squarely under
      this meaning of IOMMU_RESV_MSI, apply that type to their regions as well,
      so that we tell the same story to userspace across all platforms.
      
      Secondly, as the various region types require quite different handling,
      and it really makes little sense to ever try combining them, convert the
      bitfield-esque #defines to a plain enum in the process before anyone
      gets the wrong impression.
      
      Fixes: d30ddcaa ("iommu: Add a new type field in iommu_resv_region")
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      CC: Alex Williamson <alex.williamson@redhat.com>
      CC: David Woodhouse <dwmw2@infradead.org>
      CC: kvm@vger.kernel.org
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      9d3a4de4
  10. 25 2月, 2017 1 次提交
  11. 10 2月, 2017 3 次提交
  12. 25 1月, 2017 2 次提交
    • B
      treewide: Move dma_ops from struct dev_archdata into struct device · 5657933d
      Bart Van Assche 提交于
      Some but not all architectures provide set_dma_ops(). Move dma_ops
      from struct dev_archdata into struct device such that it becomes
      possible on all architectures to configure dma_ops per device.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: linux-arch@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: x86@kernel.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      5657933d
    • B
      treewide: Constify most dma_map_ops structures · 5299709d
      Bart Van Assche 提交于
      Most dma_map_ops structures are never modified. Constify these
      structures such that these can be write-protected. This patch
      has been generated as follows:
      
      git grep -l 'struct dma_map_ops' |
        xargs -d\\n sed -i \
          -e 's/struct dma_map_ops/const struct dma_map_ops/g' \
          -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
          -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
          -e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
      sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
        $(git grep -l 'struct dma_map_ops intel_dma_ops');
      sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
        $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
      sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
             -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
             -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
          drivers/pci/host/*.c
      sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
      sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
      sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: linux-arch@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: x86@kernel.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      5299709d
  13. 23 1月, 2017 3 次提交
  14. 04 1月, 2017 1 次提交
    • H
      iommu/amd: Fix the left value check of cmd buffer · 432abf68
      Huang Rui 提交于
      The generic command buffer entry is 128 bits (16 bytes), so the offset
      of tail and head pointer should be 16 bytes aligned and increased with
      0x10 per command.
      
      When cmd buf is full, head = (tail + 0x10) % CMD_BUFFER_SIZE.
      
      So when left space of cmd buf should be able to store only two
      command, we should be issued one COMPLETE_WAIT additionally to wait
      all older commands completed. Then the left space should be increased
      after IOMMU fetching from cmd buf.
      
      So left check value should be left <= 0x20 (two commands).
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Fixes: ac0ea6e9 ('x86/amd-iommu: Improve handling of full command buffer')
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      432abf68
  15. 15 11月, 2016 1 次提交
  16. 20 9月, 2016 1 次提交
  17. 19 9月, 2016 2 次提交
  18. 15 9月, 2016 1 次提交
    • J
      iommu/amd: Don't put completion-wait semaphore on stack · 4bf5beef
      Joerg Roedel 提交于
      The semaphore used by the AMD IOMMU to signal command
      completion lived on the stack until now, which was safe as
      the driver busy-waited on the semaphore with IRQs disabled,
      so the stack can't go away under the driver.
      
      But the recently introduced vmap-based stacks break this as
      the physical address of the semaphore can't be determinded
      easily anymore. The driver used the __pa() macro, but that
      only works in the direct-mapping. The result were
      Completion-Wait timeout errors seen by the IOMMU driver,
      breaking system boot.
      
      Since putting the semaphore on the stack is bad design
      anyway, move the semaphore into 'struct amd_iommu'. It is
      protected by the per-iommu lock and now in the direct
      mapping again. This fixes the Completion-Wait timeout errors
      and makes AMD IOMMU systems boot again with vmap-based
      stacks enabled.
      Reported-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      4bf5beef
  19. 05 9月, 2016 4 次提交