summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommu-sysfs.c
AgeCommit message (Collapse)AuthorFilesLines
2017-02-10iommu: Make iommu_device_link/unlink take a struct iommu_deviceJoerg Roedel1-8/+8
This makes the interface more consistent with iommu_device_sysfs_add/remove. Signed-off-by: Joerg Roedel <jroedel@suse.de>
2017-02-10iommu: Add sysfs bindings for struct iommu_deviceJoerg Roedel1-27/+18
There is currently support for iommu sysfs bindings, but those need to be implemented in the IOMMU drivers. Add a more generic version of this by adding a struct device to struct iommu_device and use that for the sysfs bindings. Also convert the AMD and Intel IOMMU driver to make use of it. Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-07-07iommu: Fix compile error in iommu-sysfs.cJoerg Roedel1-0/+1
Add missing include of <linux/slab.h>. Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-07-04iommu: Add sysfs support for IOMMUsAlex Williamson1-0/+133
IOMMUs currently have no common representation to userspace, most seem to have no representation at all aside from a few printks on bootup. There are however features of IOMMUs that are useful to know about. For instance the IOMMU might support superpages, making use of processor large/huge pages more important in a device assignment scenario. It's also useful to create cross links between devices and IOMMU hardware units, so that users might be able to load balance their devices to avoid thrashing a single hardware unit. This patch adds a device create and destroy interface as well as device linking, making it very lightweight for an IOMMU driver to add basic support. IOMMU drivers can provide additional attributes automatically by using an attribute_group. The attributes exposed are expected to be relatively device specific, the means to retrieve them certainly are, so there are currently no common attributes for the new class created here. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>