summaryrefslogtreecommitdiff
path: root/drivers/iommu/intel/cap_audit.c
diff options
context:
space:
mode:
authorKyung Min Park <kyung.min.park@intel.com>2021-02-04 09:43:57 +0800
committerJoerg Roedel <jroedel@suse.de>2021-02-04 14:42:00 +0100
commit010bf5659e01b0a169e8e6b9e6a8b7e62209470d (patch)
tree57dff80e711070e1fd8cfdddefec9b57f6b31dfa /drivers/iommu/intel/cap_audit.c
parentad3d19029979b19378ece2011fc8ce07be98c905 (diff)
downloadlinux-010bf5659e01b0a169e8e6b9e6a8b7e62209470d.tar.gz
linux-010bf5659e01b0a169e8e6b9e6a8b7e62209470d.tar.bz2
linux-010bf5659e01b0a169e8e6b9e6a8b7e62209470d.zip
iommu/vt-d: Move capability check code to cap_audit files
Move IOMMU capability check and sanity check code to cap_audit files. Also implement some helper functions for sanity checks. Signed-off-by: Kyung Min Park <kyung.min.park@intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20210130184452.31711-1-kyung.min.park@intel.com Link: https://lore.kernel.org/r/20210204014401.2846425-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel/cap_audit.c')
-rw-r--r--drivers/iommu/intel/cap_audit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/iommu/intel/cap_audit.c b/drivers/iommu/intel/cap_audit.c
index 049bc0c76a00..b12e421a2f1a 100644
--- a/drivers/iommu/intel/cap_audit.c
+++ b/drivers/iommu/intel/cap_audit.c
@@ -183,3 +183,23 @@ int intel_cap_audit(enum cap_audit_type type, struct intel_iommu *iommu)
return -EFAULT;
}
+
+bool intel_cap_smts_sanity(void)
+{
+ return ecap_smts(intel_iommu_ecap_sanity);
+}
+
+bool intel_cap_pasid_sanity(void)
+{
+ return ecap_pasid(intel_iommu_ecap_sanity);
+}
+
+bool intel_cap_nest_sanity(void)
+{
+ return ecap_nest(intel_iommu_ecap_sanity);
+}
+
+bool intel_cap_flts_sanity(void)
+{
+ return ecap_flts(intel_iommu_ecap_sanity);
+}