[PATCH kvm-kmod] build fix for !#defined IOMMU_CACHE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This should fix the build for kernels that don't have IOMMU_CACHE,
IOMMU_CAP_CACHE_COHERENCY or iommu_domain_has_cap defined.

Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
---
 external-module-compat-comm.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index f6975e0..adf45c5 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -791,3 +793,16 @@ static inline struct page *compound_head(struct page *page)
 }
 
 #endif
+
+#include <linux/iommu.h>
+#ifndef IOMMU_CACHE
+
+#define IOMMU_CACHE	(4)
+#define IOMMU_CAP_CACHE_COHERENCY	0x1
+static inline int iommu_domain_has_cap(struct iommu_domain *domain,
+				       unsigned long cap)
+{
+	return 0;
+}
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux