From: Chris Wright <[email protected]>

This should fix the build for kernels that don't have IOMMU_CACHE,
IOMMU_CAP_CACHE_COHERENCY or iommu_domain_has_cap defined.

Signed-off-by: Chris Wright <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index a27774d..581d867 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -767,3 +767,16 @@ static inline struct page *compound_head(struct page *page)
 }
 
 #endif
+
+#include <linux/iommu.h>
+#ifndef IOMMU_CACHE
+
+#define IOMMU_CACHE    (4)
+#define IOMMU_CAP_CACHE_COHERENCY      0x1
+static inline int iommu_domain_has_cap(struct iommu_domain *domain,
+                                      unsigned long cap)
+{
+       return 0;
+}
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to