* [PATCH] kvm: add iommu_domain_has_cap to module compatible
@ 2009-04-23 8:43 Sheng Yang
0 siblings, 0 replies; 2+ messages in thread
From: Sheng Yang @ 2009-04-23 8:43 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, Sheng Yang
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
kernel/external-module-compat-comm.h | 13 +++++++++++++
kernel/external-module-compat.c | 7 +++++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index c955927..5fb34c4 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -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
diff --git a/kernel/external-module-compat.c b/kernel/external-module-compat.c
index 0d858be..ac8bff7 100644
--- a/kernel/external-module-compat.c
+++ b/kernel/external-module-compat.c
@@ -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
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] kvm: add iommu_domain_has_cap to module compatible
@ 2009-05-05 3:42 Sheng Yang
0 siblings, 0 replies; 2+ messages in thread
From: Sheng Yang @ 2009-05-05 3:42 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, Sheng Yang
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 8:43 [PATCH] kvm: add iommu_domain_has_cap to module compatible Sheng Yang
2009-05-05 3:42 Sheng Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.