diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 18:59:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 18:59:35 -0400 |
| commit | dc7aafba6bfa1ea5806c6ac402e690682f950f75 (patch) | |
| tree | 01b8dbd05444d2de91cf9058a596e40c3cbc2a6d | |
| parent | 161d2e0a195292a8a67b0f5c48e12a9984f75dac (diff) | |
| parent | 4c5e9d9f0ddf5d4ba9c51eee2ef1a4d6e93ccf56 (diff) | |
Merge tag 'iommu-updates-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu updates from Joerg Roedel:
"This time with:
- support for the generic PCI device alias code in x86 IOMMU drivers
- a new sysfs interface for IOMMUs
- preparations for hotplug support in the Intel IOMMU driver
- change the AMD IOMMUv2 driver to not hold references to core data
structures like mm_struct or task_struct. Rely on mmu_notifers
instead.
- removal of the OMAP IOVMM interface, all users of it are converted
to DMA-API now
- make the struct iommu_ops const everywhere
- initial PCI support for the ARM SMMU driver
- there is now a generic device tree binding documented for ARM
IOMMUs
- various fixes and cleanups all over the place
Also included are some changes to the OMAP code, which are acked by
the maintainer"
* tag 'iommu-updates-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (67 commits)
devicetree: Add generic IOMMU device tree bindings
iommu/vt-d: Fix race setting IRQ CPU affinity while freeing IRQ
iommu/amd: Fix 2 typos in comments
iommu/amd: Fix device_state reference counting
iommu/amd: Remove change_pte mmu_notifier call-back
iommu/amd: Don't set pasid_state->mm to NULL in unbind_pasid
iommu/exynos: Select ARM_DMA_USE_IOMMU
iommu/vt-d: Exclude devices using RMRRs from IOMMU API domains
iommu/omap: Remove platform data da_start and da_end fields
ARM: omap: Don't set iommu pdata da_start and da_end fields
iommu/omap: Remove virtual memory manager
iommu/vt-d: Fix issue in computing domain's iommu_snooping flag
iommu/vt-d: Introduce helper function iova_size() to improve code readability
iommu/vt-d: Introduce helper domain_pfn_within_range() to simplify code
iommu/vt-d: Simplify intel_unmap_sg() and kill duplicated code
iommu/vt-d: Change iommu_enable/disable_translation to return void
iommu/vt-d: Simplify include/linux/dmar.h
iommu/vt-d: Avoid freeing virtual machine domain in free_dmar_iommu()
iommu/vt-d: Fix possible invalid memory access caused by free_dmar_iommu()
iommu/vt-d: Allocate dynamic domain id for virtual domains only
...
41 files changed, 1567 insertions, 2050 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-iommu b/Documentation/ABI/testing/sysfs-class-iommu new file mode 100644 index 000000000000..6d0a1b4be82d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-iommu | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | What: /sys/class/iommu/<iommu>/devices/ | ||
| 2 | Date: June 2014 | ||
| 3 | KernelVersion: 3.17 | ||
| 4 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 5 | Description: | ||
| 6 | IOMMU drivers are able to link devices managed by a | ||
| 7 | given IOMMU here to allow association of IOMMU to | ||
| 8 | device. | ||
| 9 | |||
| 10 | What: /sys/devices/.../iommu | ||
| 11 | Date: June 2014 | ||
| 12 | KernelVersion: 3.17 | ||
| 13 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 14 | Description: | ||
| 15 | IOMMU drivers are able to link the IOMMU for a | ||
| 16 | given device here to allow association of device to | ||
| 17 | IOMMU. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu new file mode 100644 index 000000000000..d6ba8e8a4a97 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | What: /sys/class/iommu/<iommu>/amd-iommu/cap | ||
| 2 | Date: June 2014 | ||
| 3 | KernelVersion: 3.17 | ||
| 4 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 5 | Description: | ||
| 6 | IOMMU capability header as documented in the AMD IOMMU | ||
| 7 | specification. Format: %x | ||
| 8 | |||
| 9 | What: /sys/class/iommu/<iommu>/amd-iommu/features | ||
| 10 | Date: June 2014 | ||
| 11 | KernelVersion: 3.17 | ||
| 12 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 13 | Description: | ||
| 14 | Extended features of the IOMMU. Format: %llx | ||
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu new file mode 100644 index 000000000000..258cc246d98e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | What: /sys/class/iommu/<iommu>/intel-iommu/address | ||
| 2 | Date: June 2014 | ||
| 3 | KernelVersion: 3.17 | ||
| 4 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 5 | Description: | ||
| 6 | Physical address of the VT-d DRHD for this IOMMU. | ||
| 7 | Format: %llx. This allows association of a sysfs | ||
| 8 | intel-iommu with a DMAR DRHD table entry. | ||
| 9 | |||
| 10 | What: /sys/class/iommu/<iommu>/intel-iommu/cap | ||
| 11 | Date: June 2014 | ||
| 12 | KernelVersion: 3.17 | ||
| 13 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 14 | Description: | ||
| 15 | The cached hardware capability register value | ||
| 16 | of this DRHD unit. Format: %llx. | ||
| 17 | |||
| 18 | What: /sys/class/iommu/<iommu>/intel-iommu/ecap | ||
| 19 | Date: June 2014 | ||
| 20 | KernelVersion: 3.17 | ||
| 21 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 22 | Description: | ||
| 23 | The cached hardware extended capability register | ||
| 24 | value of this DRHD unit. Format: %llx. | ||
| 25 | |||
| 26 | What: /sys/class/iommu/<iommu>/intel-iommu/version | ||
| 27 | Date: June 2014 | ||
| 28 | KernelVersion: 3.17 | ||
| 29 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 30 | Description: | ||
| 31 | The architecture version as reported from the | ||
| 32 | VT-d VER_REG. Format: %d:%d, major:minor | ||
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt index f284b99402bc..2d0f7cd867ea 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt | |||
| @@ -42,12 +42,6 @@ conditions. | |||
| 42 | 42 | ||
| 43 | ** System MMU optional properties: | 43 | ** System MMU optional properties: |
| 44 | 44 | ||
| 45 | - smmu-parent : When multiple SMMUs are chained together, this | ||
| 46 | property can be used to provide a phandle to the | ||
| 47 | parent SMMU (that is the next SMMU on the path going | ||
| 48 | from the mmu-masters towards memory) node for this | ||
| 49 | SMMU. | ||
| 50 | |||
| 51 | - calxeda,smmu-secure-config-access : Enable proper handling of buggy | 45 | - calxeda,smmu-secure-config-access : Enable proper handling of buggy |
| 52 | implementations that always use secure access to | 46 | implementations that always use secure access to |
| 53 | SMMU configuration registers. In this case non-secure | 47 | SMMU configuration registers. In this case non-secure |
diff --git a/Documentation/devicetree/bindings/iommu/iommu.txt b/Documentation/devicetree/bindings/iommu/iommu.txt new file mode 100644 index 000000000000..5a8b4624defc --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/iommu.txt | |||
| @@ -0,0 +1,182 @@ | |||
| 1 | This document describes the generic device tree binding for IOMMUs and their | ||
| 2 | master(s). | ||
| 3 | |||
| 4 | |||
| 5 | IOMMU device node: | ||
| 6 | ================== | ||
| 7 | |||
| 8 | An IOMMU can provide the following services: | ||
| 9 | |||
| 10 | * Remap address space to allow devices to access physical memory ranges that | ||
| 11 | they otherwise wouldn't be capable of accessing. | ||
| 12 | |||
| 13 | Example: 32-bit DMA to 64-bit physical addresses | ||
| 14 | |||
| 15 | * Implement scatter-gather at page level granularity so that the device does | ||
| 16 | not have to. | ||
| 17 | |||
| 18 | * Provide system protection against "rogue" DMA by forcing all accesses to go | ||
| 19 | through the IOMMU and faulting when encountering accesses to unmapped | ||
| 20 | address regions. | ||
| 21 | |||
| 22 | * Provide address space isolation between multiple contexts. | ||
| 23 | |||
