All of lore.kernel.org
 help / color / mirror / Atom feed
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: Tue,  5 May 2009 11:42:10 +0800	[thread overview]
Message-ID: <1241494930-14553-1-git-send-email-sheng@linux.intel.com> (raw)

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


             reply	other threads:[~2009-05-05  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05  3:42 Sheng Yang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-04-23  8:43 [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=1241494930-14553-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.