a5459cfece
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>
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
What: /sys/class/iommu/<iommu>/intel-iommu/address
|
|
Date: June 2014
|
|
KernelVersion: 3.17
|
|
Contact: Alex Williamson <alex.williamson@redhat.com>
|
|
Description:
|
|
Physical address of the VT-d DRHD for this IOMMU.
|
|
Format: %llx. This allows association of a sysfs
|
|
intel-iommu with a DMAR DRHD table entry.
|
|
|
|
What: /sys/class/iommu/<iommu>/intel-iommu/cap
|
|
Date: June 2014
|
|
KernelVersion: 3.17
|
|
Contact: Alex Williamson <alex.williamson@redhat.com>
|
|
Description:
|
|
The cached hardware capability register value
|
|
of this DRHD unit. Format: %llx.
|
|
|
|
What: /sys/class/iommu/<iommu>/intel-iommu/ecap
|
|
Date: June 2014
|
|
KernelVersion: 3.17
|
|
Contact: Alex Williamson <alex.williamson@redhat.com>
|
|
Description:
|
|
The cached hardware extended capability register
|
|
value of this DRHD unit. Format: %llx.
|
|
|
|
What: /sys/class/iommu/<iommu>/intel-iommu/version
|
|
Date: June 2014
|
|
KernelVersion: 3.17
|
|
Contact: Alex Williamson <alex.williamson@redhat.com>
|
|
Description:
|
|
The architecture version as reported from the
|
|
VT-d VER_REG. Format: %d:%d, major:minor
|