All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Shi <yang.shi@windriver.com>
To: yu.liu@freescale.com, hollisb@us.ibm.com, avi@redhat.com
Cc: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: [PATCH 2/2] KVM/PPC: Fix kvm_main.c build error for PPC KVM
Date: Thu,  2 Jul 2009 10:55:30 +0800	[thread overview]
Message-ID: <a3371dff010b57f832d47de0c15f4eb965041628.1246502441.git.yang.shi@windriver.com> (raw)
In-Reply-To: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com>
In-Reply-To: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com>

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 --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

  reply	other threads:[~2009-07-02  2:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  2:55 [PATCH 1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error Yang Shi
2009-07-02  2:55 ` Yang Shi
2009-07-02  2:55 ` Yang Shi [this message]
     [not found] ` <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2009-07-02  3:09   ` Liu Yu-B13201
2009-07-02  3:09     ` Liu Yu-B13201
     [not found]     ` <0A1FE637C2C7E148B9573BB60CC630E531C59D-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2009-07-02 11:19       ` Avi Kivity
2009-07-02 11:19         ` Avi Kivity
     [not found]         ` <4A4C97C4.9090908-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-07-03  1:35           ` Liu Yu-B13201
2009-07-03  1:35             ` Liu Yu-B13201

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3371dff010b57f832d47de0c15f4eb965041628.1246502441.git.yang.shi@windriver.com \
    --to=yang.shi@windriver.com \
    --cc=avi@redhat.com \
    --cc=hollisb@us.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=yu.liu@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.