aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2014-06-12 18:12:31 -0400
committerJoerg Roedel <jroedel@suse.de>2014-07-04 06:35:59 -0400
commita5459cfece880e82778a60e6290ad6c0dd688a06 (patch)
treef032c49a317bc56b2d3a9883933b1b154a037fdf /Documentation/ABI
parentc61959ecbbc6bf9034e65c8e8ef03fa9d1066f05 (diff)
iommu/vt-d: Make use of IOMMU sysfs support
Register our DRHD IOMMUs, cross link devices, and provide a base set of attributes for the IOMMU. Note that IRQ remapping support parses the DMAR table very early in boot, well before the iommu_class can reasonably be setup, so our registration is split between intel_iommu_init(), which occurs later, and alloc_iommu(), which typically occurs much earlier, but may happen at any time later with IOMMU hot-add support. On a typical desktop system, this provides the following (pruned): $ find /sys | grep dmar /sys/devices/virtual/iommu/dmar0 /sys/devices/virtual/iommu/dmar0/devices /sys/devices/virtual/iommu/dmar0/devices/0000:00:02.0 /sys/devices/virtual/iommu/dmar0/intel-iommu /sys/devices/virtual/iommu/dmar0/intel-iommu/cap /sys/devices/virtual/iommu/dmar0/intel-iommu/ecap /sys/devices/virtual/iommu/dmar0/intel-iommu/address /sys/devices/virtual/iommu/dmar0/intel-iommu/version /sys/devices/virtual/iommu/dmar1 /sys/devices/virtual/iommu/dmar1/devices /sys/devices/virtual/iommu/dmar1/devices/0000:00:00.0 /sys/devices/virtual/iommu/dmar1/devices/0000:00:01.0 /sys/devices/virtual/iommu/dmar1/devices/0000:00:16.0 /sys/devices/virtual/iommu/dmar1/devices/0000:00:1a.0 /sys/devices/virtual/iommu/dmar1/devices/0000:00:1b.0 /sys/devices/virtual/iommu/dmar1/devices/0000:00:1c.0 ... /sys/devices/virtual/iommu/dmar1/intel-iommu /sys/devices/virtual/iommu/dmar1/intel-iommu/cap /sys/devices/virtual/iommu/dmar1/intel-iommu/ecap /sys/devices/virtual/iommu/dmar1/intel-iommu/address /sys/devices/virtual/iommu/dmar1/intel-iommu/version /sys/class/iommu/dmar0 /sys/class/iommu/dmar1 (devices also link back to the dmar units) This makes address, version, capabilities, and extended capabilities available, just like printed on boot. I've tried not to duplicate data that can be found in the DMAR table, with the exception of the address, which provides an easy way to associate the sysfs device with a DRHD entry in the DMAR. It's tempting to add scopes and RMRR data here, but the full DMAR table is already exposed under /sys/firmware/ and therefore already provides a way for userspace to learn such details. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu-intel-iommu32
1 files changed, 32 insertions, 0 deletions
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 @@
1What: /sys/class/iommu/<iommu>/intel-iommu/address
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
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
10What: /sys/class/iommu/<iommu>/intel-iommu/cap
11Date: June 2014
12KernelVersion: 3.17
13Contact: Alex Williamson <alex.williamson@redhat.com>
14Description:
15 The cached hardware capability register value
16 of this DRHD unit. Format: %llx.
17
18What: /sys/class/iommu/<iommu>/intel-iommu/ecap
19Date: June 2014
20KernelVersion: 3.17
21Contact: Alex Williamson <alex.williamson@redhat.com>
22Description:
23 The cached hardware extended capability register
24 value of this DRHD unit. Format: %llx.
25
26What: /sys/class/iommu/<iommu>/intel-iommu/version
27Date: June 2014
28KernelVersion: 3.17
29Contact: Alex Williamson <alex.williamson@redhat.com>
30Description:
31 The architecture version as reported from the
32 VT-d VER_REG. Format: %d:%d, major:minor