* linux-next: kvm/powerpc tree build failure
@ 2009-06-17 5:04 Stephen Rothwell
2009-06-17 13:49 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-06-17 5:04 UTC (permalink / raw)
To: Avi Kivity, Benjamin Herrenschmidt; +Cc: linuxppc-dev, linux-next, linux-kernel
Hi Avi, Ben,
Today's linux-next build (powerpc ppc44x_defconfig) failed like this:
cc1: warnings being treated as errors
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1178: error: integer overflow in expression
Probably caused by commit ac04527f7947020c5890090b2ac87af4e98d977e ("KVM:
Disable large pages on misaligned memory slots"). The build fails because
arch/powerpc is now being built (mostly) with -Werror.
arch/powerpc/include/asm/kvm_host.h:#define KVM_PAGES_PER_HPAGE (1<<31)
this needs to be (1UL << 31) or ((unsigned int)1 << 31).
I applied the following patch for today.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 17 Jun 2009 14:57:29 +1000
Subject: [PATCH] kvm/powerpc: make 32 bit constant unsigned long
KVM_PAGES_PER_HPAGE needs to be unsigned long since its value is 2^31.
Eliminates this compiler warning:
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1178: error: integer overflow in expression
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
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 3625424..d4caa61 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.3.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: kvm/powerpc tree build failure
2009-06-17 5:04 linux-next: kvm/powerpc tree build failure Stephen Rothwell
@ 2009-06-17 13:49 ` Avi Kivity
2009-06-17 13:55 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2009-06-17 13:49 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, linuxppc-dev
On 06/17/2009 08:04 AM, Stephen Rothwell wrote:
> From: Stephen Rothwell<sfr@canb.auug.org.au>
> Date: Wed, 17 Jun 2009 14:57:29 +1000
> Subject: [PATCH] kvm/powerpc: make 32 bit constant unsigned long
>
> KVM_PAGES_PER_HPAGE needs to be unsigned long since its value is 2^31.
>
> Eliminates this compiler warning:
>
>
Thanks, applied. For some reason my own build testing didn't fail on this.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: kvm/powerpc tree build failure
2009-06-17 13:49 ` Avi Kivity
@ 2009-06-17 13:55 ` Stephen Rothwell
2009-06-17 14:04 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-06-17 13:55 UTC (permalink / raw)
To: Avi Kivity; +Cc: linux-next, linux-kernel, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
Hi Avi,
On Wed, 17 Jun 2009 16:49:51 +0300 Avi Kivity <avi@redhat.com> wrote:
>
> Thanks, applied. For some reason my own build testing didn't fail on this.
Thanks. It could be a different compiler version doesn't complain (I am
currently using 4.4.0) and the powerpc tree has a patch to build parts of
arch/powerpc with -Werror which makes it stand out a bit :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: kvm/powerpc tree build failure
2009-06-17 13:55 ` Stephen Rothwell
@ 2009-06-17 14:04 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-06-17 14:04 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, linuxppc-dev
On 06/17/2009 04:55 PM, Stephen Rothwell wrote:
> Hi Avi,
>
> On Wed, 17 Jun 2009 16:49:51 +0300 Avi Kivity<avi@redhat.com> wrote:
>
>> Thanks, applied. For some reason my own build testing didn't fail on this.
>>
>
> Thanks. It could be a different compiler version doesn't complain (I am
> currently using 4.4.0) and the powerpc tree has a patch to build parts of
> arch/powerpc with -Werror which makes it stand out a bit :-)
>
Ah yes, you did mention it was a warning.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-17 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 5:04 linux-next: kvm/powerpc tree build failure Stephen Rothwell
2009-06-17 13:49 ` Avi Kivity
2009-06-17 13:55 ` Stephen Rothwell
2009-06-17 14:04 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).