Skip to contentSkip to conversation

kvm: add iommu_domain_has_cap to module compatible

PATCH New Sheng Yang 1 participant 1 message Apr 23, 2009 KVM

lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 kvm: add iommu_domain_has_cap to module compatible

---
 kernel/external-module-compat-comm.h |   13 +++++++++++++
 kernel/external-module-compat.c      |    7 +++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
kernel/external-module-compat-comm.h +13 -0
index c955927..5fb34c4 100644
@@ -757,3 +757,16 @@ 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)
+#endif
+
+#include <linux/iommu.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+
+int iommu_domain_has_cap(struct iommu_domain *domain, unsigned long cap);
+
+#endif
kernel/external-module-compat.c +7 -0
index 0d858be..ac8bff7 100644
@@ -352,3 +352,10 @@ unsigned kvm_get_tsc_khz(void)
 }
 
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+int iommu_domain_has_cap(struct iommu_domain *domain, unsigned long cap)
+{
+	return 0;
+}
+#endif
Signature · 1 line
1.5.4.5