public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
       [not found] <20070606220313.8f7c1fab.akpm@linux-foundation.org>
@ 2007-06-12  0:07 ` Adrian Bunk
  2007-06-12  3:22   ` Dave Jones
  2007-06-12  6:00   ` Avi Kivity
  0 siblings, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2007-06-12  0:07 UTC (permalink / raw)
  To: Andrew Morton, avi; +Cc: linux-kernel, kvm-devel

On Wed, Jun 06, 2007 at 10:03:13PM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.22-rc4-mm1:
>...
>  git-kvm.patch
>...
>  git trees
>...

I'm getting the following compile error with CONFIG_X86_CMPXCHG64=n 
(with -Werror-implicit-function-declaration - otherwise it would be a 
link error):

<--  snip  -->

...
  CC [M]  drivers/kvm/mmu.o
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc4-mm2/drivers/kvm/mmu.c: In function ‘set_shadow_pte’:
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc4-mm2/drivers/kvm/mmu.c:199: error: implicit declaration of function ‘set_64bit’
make[3]: *** [drivers/kvm/mmu.o] Error 1

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12  0:07 ` 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n Adrian Bunk
@ 2007-06-12  3:22   ` Dave Jones
  2007-06-12 22:03     ` Andrew Morton
  2007-06-12  6:00   ` Avi Kivity
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Jones @ 2007-06-12  3:22 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, avi, linux-kernel, kvm-devel

On Tue, Jun 12, 2007 at 02:07:18AM +0200, Adrian Bunk wrote:
 
 > I'm getting the following compile error with CONFIG_X86_CMPXCHG64=n 
 > (with -Werror-implicit-function-declaration - otherwise it would be a 
 > link error):

We really should just get that flag into mainline so that it breaks
for people before they submit patches.  We run into this constantly.


Add -Werror-implicit-function-declaration
This makes builds fail sooner if something is implicitly defined instead
of having to wait half an hour for it to fail at the linking stage.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6/Makefile~	2007-06-04 16:46:24.000000000 -0400
+++ linux-2.6/Makefile	2007-06-04 16:46:53.000000000 -0400
@@ -313,7 +313,8 @@ LINUXINCLUDE    := -Iinclude \
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-                   -fno-strict-aliasing -fno-common
+		   -fno-strict-aliasing -fno-common \
+		   -Werror-implicit-function-declaration
 AFLAGS          := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12  0:07 ` 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n Adrian Bunk
  2007-06-12  3:22   ` Dave Jones
@ 2007-06-12  6:00   ` Avi Kivity
  1 sibling, 0 replies; 8+ messages in thread
From: Avi Kivity @ 2007-06-12  6:00 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel, kvm-devel

Adrian Bunk wrote:
> On Wed, Jun 06, 2007 at 10:03:13PM -0700, Andrew Morton wrote:
>   
>> ...
>> Changes since 2.6.22-rc4-mm1:
>> ...
>>  git-kvm.patch
>> ...
>>  git trees
>> ...
>>     
>
> I'm getting the following compile error with CONFIG_X86_CMPXCHG64=n 
> (with -Werror-implicit-function-declaration - otherwise it would be a 
> link error):
>
> <--  snip  -->
>
> ...
>   CC [M]  drivers/kvm/mmu.o
> /home/bunk/linux/kernel-2.6/linux-2.6.22-rc4-mm2/drivers/kvm/mmu.c: In function ‘set_shadow_pte’:
> /home/bunk/linux/kernel-2.6/linux-2.6.22-rc4-mm2/drivers/kvm/mmu.c:199: error: implicit declaration of function ‘set_64bit’
> make[3]: *** [drivers/kvm/mmu.o] Error 1
>
> <--  snip  -->
>   

I've committed the following, which should disable kvm on i486 and below:

diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
index 2f661e5..33fa28a 100644
--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -11,6 +11,7 @@ if VIRTUALIZATION
 config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
        depends on X86 && EXPERIMENTAL
+       depends on X86_CMPXCHG64 || 64BIT
        ---help---
          Support hosting fully virtualized guest machines using hardware
          virtualization extensions.  You will need a fairly recent


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12  3:22   ` Dave Jones
@ 2007-06-12 22:03     ` Andrew Morton
  2007-06-12 22:16       ` Dave Jones
  2007-06-12 22:37       ` Adrian Bunk
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2007-06-12 22:03 UTC (permalink / raw)
  To: Dave Jones; +Cc: Adrian Bunk, avi, linux-kernel, kvm-devel

On Mon, 11 Jun 2007 23:22:24 -0400
Dave Jones <davej@redhat.com> wrote:

> Add -Werror-implicit-function-declaration
> This makes builds fail sooner if something is implicitly defined instead
> of having to wait half an hour for it to fail at the linking stage.
> 
> Signed-off-by: Dave Jones <davej@redhat.com>
> 
> --- linux-2.6/Makefile~	2007-06-04 16:46:24.000000000 -0400
> +++ linux-2.6/Makefile	2007-06-04 16:46:53.000000000 -0400
> @@ -313,7 +313,8 @@ LINUXINCLUDE    := -Iinclude \
>  CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
>  
>  CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> -                   -fno-strict-aliasing -fno-common
> +		   -fno-strict-aliasing -fno-common \
> +		   -Werror-implicit-function-declaration
>  AFLAGS          := -D__ASSEMBLY__
>  
>  # Read KERNELRELEASE from include/config/kernel.release (if it exists)

This causes the i386 allmodconfig build to fail:

include/linux/uaccess.h: In function 'pagefault_disable':
include/linux/uaccess.h:23: error: implicit declaration of function '__memory_barrier'

I didn't look to see why...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12 22:03     ` Andrew Morton
@ 2007-06-12 22:16       ` Dave Jones
  2007-06-12 22:43         ` Andrew Morton
  2007-06-12 22:37       ` Adrian Bunk
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Jones @ 2007-06-12 22:16 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, avi, linux-kernel, kvm-devel

On Tue, Jun 12, 2007 at 03:03:57PM -0700, Andrew Morton wrote:
 > On Mon, 11 Jun 2007 23:22:24 -0400
 > Dave Jones <davej@redhat.com> wrote:
 > 
 > > Add -Werror-implicit-function-declaration
 > > This makes builds fail sooner if something is implicitly defined instead
 > > of having to wait half an hour for it to fail at the linking stage.
 > > 
 > > Signed-off-by: Dave Jones <davej@redhat.com>
 > > 
 > > --- linux-2.6/Makefile~	2007-06-04 16:46:24.000000000 -0400
 > > +++ linux-2.6/Makefile	2007-06-04 16:46:53.000000000 -0400
 > > @@ -313,7 +313,8 @@ LINUXINCLUDE    := -Iinclude \
 > >  CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 > >  
 > >  CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 > > -                   -fno-strict-aliasing -fno-common
 > > +		   -fno-strict-aliasing -fno-common \
 > > +		   -Werror-implicit-function-declaration
 > >  AFLAGS          := -D__ASSEMBLY__
 > >  
 > >  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
 > 
 > This causes the i386 allmodconfig build to fail:

Seems to be doing its job rather effectively.

 > include/linux/uaccess.h: In function 'pagefault_disable':
 > include/linux/uaccess.h:23: error: implicit declaration of function '__memory_barrier'
 > 
 > I didn't look to see why...

include/linux/compiler.h ..

/* Optimization barrier */
#ifndef barrier
# define barrier() __memory_barrier()
#endif

We shouldn't be hitting this, because barrier should be getting defined
in the compiler specific headers above..

#if __GNUC__ >= 4
# include <linux/compiler-gcc4.h>
#elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2
# include <linux/compiler-gcc3.h>
#else
# error Sorry, your compiler is too old/not recognized.
#endif

both of those include linux/compiler-gcc.h, which defines barrier.
How strange.  What compiler version is this?

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12 22:03     ` Andrew Morton
  2007-06-12 22:16       ` Dave Jones
@ 2007-06-12 22:37       ` Adrian Bunk
  1 sibling, 0 replies; 8+ messages in thread
From: Adrian Bunk @ 2007-06-12 22:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dave Jones, avi, linux-kernel, kvm-devel

On Tue, Jun 12, 2007 at 03:03:57PM -0700, Andrew Morton wrote:
> On Mon, 11 Jun 2007 23:22:24 -0400
> Dave Jones <davej@redhat.com> wrote:
> 
> > Add -Werror-implicit-function-declaration
> > This makes builds fail sooner if something is implicitly defined instead
> > of having to wait half an hour for it to fail at the linking stage.
> > 
> > Signed-off-by: Dave Jones <davej@redhat.com>
> > 
> > --- linux-2.6/Makefile~	2007-06-04 16:46:24.000000000 -0400
> > +++ linux-2.6/Makefile	2007-06-04 16:46:53.000000000 -0400
> > @@ -313,7 +313,8 @@ LINUXINCLUDE    := -Iinclude \
> >  CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
> >  
> >  CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> > -                   -fno-strict-aliasing -fno-common
> > +		   -fno-strict-aliasing -fno-common \
> > +		   -Werror-implicit-function-declaration
> >  AFLAGS          := -D__ASSEMBLY__
> >  
> >  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
> 
> This causes the i386 allmodconfig build to fail:
> 
> include/linux/uaccess.h: In function 'pagefault_disable':
> include/linux/uaccess.h:23: error: implicit declaration of function '__memory_barrier'
> 
> I didn't look to see why...

I have -Werror-implicit-function-declaration in the CFLAGS of my 
testbuilds for ages without ever hitting this.

Perhaps some change in your working tree?
Can you verify this problem with 2.6.22-rc4-mm2?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12 22:16       ` Dave Jones
@ 2007-06-12 22:43         ` Andrew Morton
  2007-06-12 22:48           ` Dave Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2007-06-12 22:43 UTC (permalink / raw)
  To: Dave Jones; +Cc: Adrian Bunk, avi, linux-kernel, kvm-devel

On Tue, 12 Jun 2007 18:16:29 -0400
Dave Jones <davej@redhat.com> wrote:

>  > >  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
>  > 
>  > This causes the i386 allmodconfig build to fail:
> 
> Seems to be doing its job rather effectively.

err, hang on.  I had a different patch in there which hilariously broke
the build all over the place, and dropping that has made your patch
come good.  I'll put it back.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n
  2007-06-12 22:43         ` Andrew Morton
@ 2007-06-12 22:48           ` Dave Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Jones @ 2007-06-12 22:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, avi, linux-kernel, kvm-devel

On Tue, Jun 12, 2007 at 03:43:45PM -0700, Andrew Morton wrote:
 > On Tue, 12 Jun 2007 18:16:29 -0400
 > Dave Jones <davej@redhat.com> wrote:
 > 
 > >  > >  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
 > >  > 
 > >  > This causes the i386 allmodconfig build to fail:
 > > 
 > > Seems to be doing its job rather effectively.
 > 
 > err, hang on.  I had a different patch in there which hilariously broke
 > the build all over the place, and dropping that has made your patch
 > come good.  I'll put it back.

This was all just a cunning trick to make me download and build an -mm
kernel wasn't it ? :-)

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-06-12 22:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070606220313.8f7c1fab.akpm@linux-foundation.org>
2007-06-12  0:07 ` 2.6.22-rc4-mm2: kvm compile breakage with X86_CMPXCHG64=n Adrian Bunk
2007-06-12  3:22   ` Dave Jones
2007-06-12 22:03     ` Andrew Morton
2007-06-12 22:16       ` Dave Jones
2007-06-12 22:43         ` Andrew Morton
2007-06-12 22:48           ` Dave Jones
2007-06-12 22:37       ` Adrian Bunk
2007-06-12  6:00   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox