[PATCH 2/2] KVM/PPC: Fix kvm_main.c build error for PPC KVM
Yang Shi
yang.shi at windriver.com
Thu Jul 2 12:55:30 EST 2009
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 at 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
More information about the Linuxppc-dev
mailing list