diff mbox

[2/2] KVM/PPC: Fix kvm_main.c build error for PPC KVM

Message ID a3371dff010b57f832d47de0c15f4eb965041628.1246502441.git.yang.shi@windriver.com
State Not Applicable
Headers show

Commit Message

yshi July 2, 2009, 2:55 a.m. UTC
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.shi@windriver.com>
 arch/powerpc/include/asm/kvm_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox


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 @@ 
 /* 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;