From: Jan Kiszka <jan.kis...@siemens.com> It was broken for !CONFIG_HUGETLB_PAGE and for kernel 2.6.31.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com> diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index c72fb86..47fdc86 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -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 -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html