summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-06-12 10:14:02 +0200
committerJoerg Roedel <jroedel@suse.de>2015-06-16 10:59:34 +0200
commit4158c2eca3c77ed3cccdcaeab153aad4e433369c (patch)
tree9a4b82ece9257f547d8958d1925c128e2d0f266b /include/linux
parent5f0a7f7614a9d99325ac8d618f1cdf7a3014287c (diff)
iommu/vt-d: Detect pre enabled translation
Add code to detect whether translation is already enabled in the IOMMU. Save this state in a flags field added to struct intel_iommu. Tested-by: ZhenHua Li <zhen-hual@hp.com> Tested-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/intel-iommu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index a240e61a7700..b85b81ad5eba 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -320,6 +320,9 @@ enum {
MAX_SR_DMAR_REGS
};
+#define VTD_FLAG_TRANS_PRE_ENABLED (1 << 0)
+#define VTD_FLAG_IRQ_REMAP_PRE_ENABLED (1 << 1)
+
struct intel_iommu {
void __iomem *reg; /* Pointer to hardware regs, virtual addr */
u64 reg_phys; /* physical address of hw register set */
@@ -351,6 +354,7 @@ struct intel_iommu {
#endif
struct device *iommu_dev; /* IOMMU-sysfs device */
int node;
+ u32 flags; /* Software defined flags */
};
static inline void __iommu_flush_cache(