iommu/vt-d: Always enable PASID/PRI PCI capabilities before ATS
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 12 Oct 2015 13:17:37 +0000 (14:17 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 15 Oct 2015 11:05:39 +0000 (12:05 +0100)
commitb16d0cb9e2fc5c311948c660dd6f4b59a9ccd333
tree1f63f7efe5e6607d30372c90aac2275ae8689f9a
parent8a94ade4ce6df22006b96c5c9a8d6d12fce67585
iommu/vt-d: Always enable PASID/PRI PCI capabilities before ATS

The behaviour if you enable PASID support after ATS is undefined. So we
have to enable it first, even if we don't know whether we'll need it.

This is safe enough; unless we set up a context that permits it, the device
can't actually *do* anything with it.

Also shift the feature detction to dmar_insert_one_dev_info() as it only
needs to happen once.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/iommu/Kconfig
drivers/iommu/intel-iommu.c