With the latest kernel building KVM for PPC, got integer overflow error in kvm_main.c file. The root cause is that compiler consider KVM_PAGES_PER_HPAGE as signed long type, however it should be unsigned long type.
So, change it to unsigned long type in include/asm/kvm_host.h Signed-off-by: Yang Shi <yang....@windriver.com> --- arch/powerpc/include/asm/kvm_host.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index dfdf13c..fddc3ed 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -34,7 +34,7 @@ #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 /* We don't currently support large pages. */ -#define KVM_PAGES_PER_HPAGE (1<<31) +#define KVM_PAGES_PER_HPAGE (1UL << 31) struct kvm; struct kvm_run; -- 1.6.0.4 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev