@@ -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
@@ -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)
Signed-off-by: Sheng Yang <sheng@linux.intel.com> --- kvm/kernel/external-module-compat-comm.h | 10 ++++++++++ kvm/kernel/external-module-compat.c | 9 +++++++++ 2 files changed, 19 insertions(+), 0 deletions(-)