Signed-off-by: Sheng Yang <[email protected]>
---
kvm/kernel/external-module-compat-comm.h | 10 ++++++++++
kvm/kernel/external-module-compat.c | 9 +++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/kvm/kernel/external-module-compat-comm.h
b/kvm/kernel/external-module-compat-comm.h
index c955927..13c3492 100644
--- a/kvm/kernel/external-module-compat-comm.h
+++ b/kvm/kernel/external-module-compat-comm.h
@@ -757,3 +757,13 @@ static inline struct page *compound_head(struct page *page)
}
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#define IOMMU_CAP_CACHE_COHERENCY 0x1
+#define IOMMU_CACHE (4)
+
+#include <linux/iommu.h>
+
+int iommu_domain_has_cap(struct iommu_domain *domain, unsigned long cap);
+
+#endif
diff --git a/kvm/kernel/external-module-compat.c
b/kvm/kernel/external-module-compat.c
index 0d858be..03d1149 100644
--- a/kvm/kernel/external-module-compat.c
+++ b/kvm/kernel/external-module-compat.c
@@ -292,6 +292,15 @@ int intel_iommu_found()
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#include <linux/iommu.h>
+
+int iommu_domain_has_cap(struct iommu_domain *domain, unsigned long cap)
+{
+ return 0;
+}
+
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
--
1.5.4.5
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html