linux/Documentation/ABI/testing
Alex Williamson a5459cfece 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>
2014-07-04 12:35:59 +02:00
..
configfs-spear-pcie-gadget
configfs-usb-gadget usb: gadget: configfs: OS Extended Properties descriptors support 2014-05-14 09:39:51 -05:00
configfs-usb-gadget-acm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ecm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-eem Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ffs Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-loopback Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-mass-storage Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ncm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-obex Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-phonet Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-rndis Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-serial Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-sourcesink Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-subset Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
debugfs-driver-genwqe GenWQE Debugfs interfaces 2013-12-18 16:51:15 -08:00
debugfs-ec
debugfs-ideapad
debugfs-olpc
debugfs-pfo-nx-crypto
debugfs-pktcdvd
dev-kmsg
evm
ima_policy ima: audit log files opened with O_DIRECT flag 2014-06-03 14:21:50 -05:00
procfs-diskstats
pstore
sysfs-ata
sysfs-block
sysfs-block-bcache
sysfs-block-dm
sysfs-block-rssd
sysfs-block-zram zram: make compression algorithm selection possible 2014-04-07 16:36:01 -07:00
sysfs-bus-acpi
sysfs-bus-bcma
sysfs-bus-css
sysfs-bus-event_source-devices-events powerpc/perf: Make some new raw event codes available in sysfs 2014-03-24 09:48:23 +11:00
sysfs-bus-event_source-devices-format
sysfs-bus-event_source-devices-hv_24x7 powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes 2014-03-24 09:48:33 +11:00
sysfs-bus-event_source-devices-hv_gpci powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes 2014-03-24 09:48:33 +11:00
sysfs-bus-fcoe
sysfs-bus-hsi
sysfs-bus-i2c-devices-fsa9480
sysfs-bus-i2c-devices-hm6352
sysfs-bus-i2c-devices-lm3533
sysfs-bus-iio iio: Add ABI documentation for illuminance 2014-05-03 11:45:26 +01:00
sysfs-bus-iio-frequency-ad9523
sysfs-bus-iio-frequency-adf4350
sysfs-bus-iio-light-lm3533-als
sysfs-bus-iio-mpu6050
sysfs-bus-iio-proximity-as3935 iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00
sysfs-bus-mdio net: phy: expose phydev->has_fixups to sysfs 2014-02-12 19:08:49 -05:00
sysfs-bus-media
sysfs-bus-mei
sysfs-bus-pci Merge branches 'pci/hotplug', 'pci/pci_is_bridge' and 'pci/virtualization' into next 2014-05-28 16:21:07 -06:00
sysfs-bus-pci-devices-cciss
sysfs-bus-pci-drivers-ehci_hcd
sysfs-bus-rbd rbd: add support for single-major device number allocation scheme 2013-12-31 20:31:59 +02:00
sysfs-bus-rpmsg
sysfs-bus-umc
sysfs-bus-usb usb: core: allow a reference device for new_id 2014-01-10 16:54:35 -08:00
sysfs-bus-usb-devices-usbsevseg
sysfs-c2port
sysfs-cfq-target-latency
sysfs-class
sysfs-class-backlight-driver-adp8870
sysfs-class-backlight-driver-lm3533
sysfs-class-bdi
sysfs-class-devfreq
sysfs-class-extcon
sysfs-class-iommu iommu: Add sysfs support for IOMMUs 2014-07-04 12:35:59 +02:00
sysfs-class-iommu-intel-iommu iommu/vt-d: Make use of IOMMU sysfs support 2014-07-04 12:35:59 +02:00
sysfs-class-lcd
sysfs-class-led
sysfs-class-led-driver-lm3533
sysfs-class-mic.txt misc: mic: Enable OSPM suspend and resume support. 2013-10-05 18:01:42 -07:00
sysfs-class-mtd mtd: add MTD_MLCNANDFLASH case for mtd_type_show() 2013-10-27 16:27:06 -07:00
sysfs-class-net net: sysfs: add missing phys_port_id documentation 2014-05-26 01:01:47 -04:00
sysfs-class-net-batman-adv batman-adv: update email address for Marek Lindner 2013-10-19 14:53:48 +02:00
sysfs-class-net-cdc_ncm net: cdc_ncm: document the sysfs API 2014-06-02 16:01:31 -07:00
sysfs-class-net-grcan
sysfs-class-net-mesh batman-adv: Modified forwarding behaviour for multicast packets 2014-03-22 09:18:57 +01:00
sysfs-class-net-queues net: sysfs: add documentation entries for /sys/class/<iface>/queues 2014-05-26 01:01:47 -04:00
sysfs-class-net-statistics net: sysfs: document /sys/class/net/statistics/* 2014-05-26 01:02:20 -04:00
sysfs-class-pktcdvd
sysfs-class-power
sysfs-class-powercap PowerCap: Documentation 2013-10-17 00:36:06 +02:00
sysfs-class-pwm
sysfs-class-rc [media] rc: add wakeup_protocols sysfs file 2014-03-11 13:28:20 -03:00
sysfs-class-regulator
sysfs-class-rtc-rtc0-device-rtc_calibration
sysfs-class-scsi_host [SCSI] hpsa: allow user to disable accelerated i/o path 2014-03-15 10:19:07 -07:00
sysfs-class-uwb_rc
sysfs-class-uwb_rc-wusbhc
sysfs-dev
sysfs-devices
sysfs-devices-edac
sysfs-devices-firmware_node
sysfs-devices-lpss_ltr
sysfs-devices-memory
sysfs-devices-mmc
sysfs-devices-online
sysfs-devices-platform-_UDC_-gadget
sysfs-devices-platform-docg3
sysfs-devices-platform-sh_mobile_lcdc_fb
sysfs-devices-power PM / wakeup: Correct presence vs. emptiness of wakeup_* attributes 2014-04-07 14:18:24 +02:00
sysfs-devices-power_resources_D0
sysfs-devices-power_resources_D1
sysfs-devices-power_resources_D2
sysfs-devices-power_resources_D3hot
sysfs-devices-power_resources_wakeup
sysfs-devices-power_state
sysfs-devices-real_power_state
sysfs-devices-resource_in_use
sysfs-devices-soc
sysfs-devices-sun
sysfs-devices-system-cpu cpufreq: Make linux-pm@vger.kernel.org official mailing list 2014-05-01 01:15:32 +02:00
sysfs-devices-system-ibm-rtl
sysfs-devices-system-xen_cpu
sysfs-driver-genwqe GenWQE Sysfs interfaces 2013-12-18 16:51:15 -08:00
sysfs-driver-hid
sysfs-driver-hid-lenovo-tpkbd
sysfs-driver-hid-logitech-lg4ff
sysfs-driver-hid-multitouch
sysfs-driver-hid-picolcd
sysfs-driver-hid-prodikeys
sysfs-driver-hid-roccat-arvo
sysfs-driver-hid-roccat-isku
sysfs-driver-hid-roccat-kone
sysfs-driver-hid-roccat-koneplus
sysfs-driver-hid-roccat-konepure
sysfs-driver-hid-roccat-kovaplus
sysfs-driver-hid-roccat-lua
sysfs-driver-hid-roccat-pyra
sysfs-driver-hid-roccat-ryos HID: roccat: add support for Ryos MK keyboards 2013-10-30 14:17:31 +01:00
sysfs-driver-hid-roccat-savu
sysfs-driver-hid-srws1
sysfs-driver-hid-wiimote HID: wiimote: add pro-controller analog stick calibration 2013-10-30 14:13:29 +01:00
sysfs-driver-intel-rapid-start
sysfs-driver-ppi
sysfs-driver-samsung-laptop
sysfs-driver-sunxi-sid ARM: sunxi: Initial support for Allwinner's Security ID fuses 2013-09-26 13:47:36 -07:00
sysfs-driver-wacom
sysfs-driver-xen-blkback
sysfs-driver-xen-blkfront
sysfs-firmware-acpi
sysfs-firmware-dmi
sysfs-firmware-efi efi: Export more EFI table variables to sysfs 2013-12-21 15:29:36 +00:00
sysfs-firmware-efi-runtime-map efi: Export EFI runtime memory mapping to sysfs 2013-12-21 15:29:36 +00:00
sysfs-firmware-gsmi
sysfs-firmware-log
sysfs-firmware-memmap
sysfs-firmware-ofw of: Make device nodes kobjects so they show up in sysfs 2014-03-11 20:48:26 +00:00
sysfs-firmware-sfi
sysfs-firmware-sgi_uv
sysfs-fs-ext4
sysfs-fs-f2fs f2fs: add missing documentation for dir_level 2014-03-20 22:10:10 +09:00
sysfs-gpio
sysfs-i2c-bmp085
sysfs-ibft
sysfs-kernel-boot_params x86: Export x86 boot_params to sysfs 2013-12-29 13:09:07 +00:00
sysfs-kernel-fscaps
sysfs-kernel-iommu_groups
sysfs-kernel-mm
sysfs-kernel-mm-hugepages
sysfs-kernel-mm-ksm
sysfs-kernel-slab
sysfs-kernel-uids
sysfs-kernel-vmcoreinfo kdump: add /sys/kernel/vmcoreinfo ABI documentation 2014-01-23 16:37:03 -08:00
sysfs-memory-page-offline
sysfs-module Use 'E' instead of 'X' for unsigned module taint flag. 2014-03-31 14:52:43 +10:30
sysfs-ocfs2
sysfs-platform-asus-laptop
sysfs-platform-asus-wmi
sysfs-platform-at91
sysfs-platform-brcmstb-gisb-arb Documentation: sysfs: add Broadcom GISB arbiter sysfs properties 2014-05-24 00:58:44 +02:00
sysfs-platform-chipidea-usb-otg Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP 2014-04-24 12:56:35 -07:00
sysfs-platform-eeepc-laptop
sysfs-platform-ideapad-laptop
sysfs-platform-kim
sysfs-platform-msi-laptop
sysfs-platform-tahvo-usb usb: omap1: Tahvo USB transceiver driver 2013-12-06 14:46:32 -06:00
sysfs-platform-ts5500
sysfs-power PM / sleep: Introduce command line argument for sleep state enumeration 2014-05-26 13:40:59 +02:00
sysfs-pps
sysfs-profiling
sysfs-ptp ptp: expose the programmable pins via sysfs 2014-03-21 14:21:14 -04:00
sysfs-tty Revert "tty: Set correct tty name in 'active' sysfs attribute" 2014-02-22 14:31:04 -08:00
sysfs-wusb_cbaf