[PATCH 3/3] iommu/amd: Add sysfs support

2014-06-12 Thread Alex Williamson
AMD-Vi support for IOMMU sysfs. This allows us to associate devices with a specific IOMMU device and examine the capabilities and features of that IOMMU. The AMD IOMMU is hosted on and actual PCI device, so we make that device the parent for the IOMMU class device. This initial implementaiton ex

[PATCH 1/3] iommu: Add sysfs support for IOMMUs

2014-06-12 Thread Alex Williamson
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

[PATCH 0/3] iommu: Expose IOMMU information in sysfs

2014-06-12 Thread Alex Williamson
Users want to know the features of their hardware and we need a better way to get it than parsing it out of dmesg. This series creates an IOMMU class and allows drivers to create and destroy a device within that class. Drivers may also link and unlink devices to expose the association of a device

[PATCH 2/3] iommu/intel: Make use of IOMMU sysfs support

2014-06-12 Thread Alex Williamson
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 lat

[RESEND PATCH] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-12 Thread Alex Williamson
The user of the IOMMU API domain expects to have full control of the IOVA space for the domain. RMRRs are fundamentally incompatible with that idea. We can neither map the RMRR into the IOMMU API domain, nor can we guarantee that the device won't continue DMA with the area described by the RMRR a