Skip to contentSkip to conversation

kvm: add iommu_domain_has_cap to module compatible

PATCH New Sheng Yang 1 participant 1 message May 5, 2009 KVM

lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 kvm: add iommu_domain_has_cap to module compatible

---
 kvm/kernel/external-module-compat-comm.h |   10 ++++++++++
 kvm/kernel/external-module-compat.c      |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
kvm/kernel/external-module-compat-comm.h +10 -0
index c955927..13c3492 100644
@@ -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
kvm/kernel/external-module-compat.c +9 -0
index 0d858be..03d1149 100644
@@ -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)
 
Signature · 1 line
1.5.4.5