From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Sheng Yang <sheng@linux.intel.com>
Subject: [PATCH] kvm: add iommu_domain_has_cap to module compatible
Date: Thu, 23 Apr 2009 16:43:10 +0800 [thread overview]
Message-ID: <1240476190-26280-1-git-send-email-sheng@linux.intel.com> (raw)
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
next reply other threads:[~2009-04-23 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 8:43 Sheng Yang [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-05-05 3:42 [PATCH] kvm: add iommu_domain_has_cap to module compatible Sheng Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240476190-26280-1-git-send-email-sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.