@@ -954,9 +954,10 @@ static inline int kvm_eventfd_signal(struct eventfd_ctx *ctx, int n)
#include <linux/hugetlb.h>
-/* vma_kernel_pagesize, 2.6.29 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+/* vma_kernel_pagesize, exported since 2.6.32 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
+#ifdef CONFIG_HUGETLB_PAGE
static inline
unsigned long kvm_vma_kernel_pagesize(struct vm_area_struct *vma)
{
@@ -969,8 +970,11 @@ unsigned long kvm_vma_kernel_pagesize(struct vm_area_struct *vma)
return 1UL << (hstate->order + PAGE_SHIFT);
}
+#else /* !CONFIG_HUGETLB_SIZE */
+#define kvm_vma_kernel_pagesize(v) PAGE_SIZE
+#endif
-#else
+#else /* >= 2.6.32 */
#define kvm_vma_kernel_pagesize vma_kernel_pagesize
It was broken for !CONFIG_HUGETLB_PAGE and for kernel 2.6.31. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- external-module-compat-comm.h | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html