@@ -1128,3 +1128,15 @@ perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
#define lockdep_is_held(m) (1)
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
+/* This is a dirty, nasty trick */
+#define iommu_map(domain, iova, paddr, gfp_order, prot) \
+({ \
+ int _r = iommu_map_range(domain, iova, paddr, PAGE_SIZE, prot); \
+ page_size = PAGE_SIZE; \
+ _r; \
+})
+#define iommu_unmap(domain, iova, gfp_order) \
+ (iommu_unmap_range(domain, iova, PAGE_SIZE),1)
+#endif