* Build failure w/o mmu notifiers @ 2008-10-17 16:34 Alexander Graf 2008-10-17 17:25 ` Sheng Yang 0 siblings, 1 reply; 11+ messages in thread From: Alexander Graf @ 2008-10-17 16:34 UTC (permalink / raw) To: KVM list; +Cc: Avi Kivity, Andrea Arcangeli Hi, I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS is not set. Is this intended? If so, it might be nice to put a configure- check or #error somewhere to tell the user that enabling mmu notifiers became mandatory. Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 16:34 Build failure w/o mmu notifiers Alexander Graf @ 2008-10-17 17:25 ` Sheng Yang 2008-10-17 17:47 ` Alexander Graf 0 siblings, 1 reply; 11+ messages in thread From: Sheng Yang @ 2008-10-17 17:25 UTC (permalink / raw) To: Alexander Graf; +Cc: KVM list, Avi Kivity, Andrea Arcangeli On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: > Hi, > > I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS is > not set. Is this intended? If so, it might be nice to put a configure- > check or #error somewhere to tell the user that enabling mmu notifiers > became mandatory. Yeah, I think it's intended. In fact, it was selected by KVM , so if you compile a kernel with KVM, I think it would work... -- regards Yang, Sheng > > Alex > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 17:25 ` Sheng Yang @ 2008-10-17 17:47 ` Alexander Graf 2008-10-17 18:17 ` Sheng Yang 0 siblings, 1 reply; 11+ messages in thread From: Alexander Graf @ 2008-10-17 17:47 UTC (permalink / raw) To: Sheng Yang; +Cc: KVM list, Avi Kivity, Andrea Arcangeli On 17.10.2008, at 19:25, Sheng Yang wrote: > On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: >> Hi, >> >> I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS >> is >> not set. Is this intended? If so, it might be nice to put a >> configure- >> check or #error somewhere to tell the user that enabling mmu >> notifiers >> became mandatory. > > Yeah, I think it's intended. In fact, it was selected by KVM > , so if you compile a kernel with KVM, I think it would work... Well - it makes it pretty hard to build KVM as an external module (which I prefer due to many reasons) and I've actually had a problem to find the option in make menuconfig somewhere - is it even selectable? Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 17:47 ` Alexander Graf @ 2008-10-17 18:17 ` Sheng Yang 2008-10-17 18:36 ` Alexander Graf 2008-10-18 7:21 ` Nikola Ciprich 0 siblings, 2 replies; 11+ messages in thread From: Sheng Yang @ 2008-10-17 18:17 UTC (permalink / raw) To: Alexander Graf; +Cc: Sheng Yang, KVM list, Avi Kivity, Andrea Arcangeli On Fri, Oct 17, 2008 at 07:47:39PM +0200, Alexander Graf wrote: > > On 17.10.2008, at 19:25, Sheng Yang wrote: > >> On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: >>> Hi, >>> >>> I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS >>> is >>> not set. Is this intended? If so, it might be nice to put a >>> configure- >>> check or #error somewhere to tell the user that enabling mmu >>> notifiers >>> became mandatory. >> >> Yeah, I think it's intended. In fact, it was selected by KVM >> , so if you compile a kernel with KVM, I think it would work... > > Well - it makes it pretty hard to build KVM as an external module (which > I prefer due to many reasons) and I've actually had a problem to find the > option in make menuconfig somewhere - is it even selectable? CONFIG_MMU_NOITFIER? No... It's automatically selected, if you select KVM, either in-kernel or module. Please refer to arch/x86/kvm/Kconfig. -- regards Yang, Sheng > > Alex > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 18:17 ` Sheng Yang @ 2008-10-17 18:36 ` Alexander Graf 2008-10-17 19:25 ` Andrea Arcangeli 2008-10-18 10:51 ` Avi Kivity 2008-10-18 7:21 ` Nikola Ciprich 1 sibling, 2 replies; 11+ messages in thread From: Alexander Graf @ 2008-10-17 18:36 UTC (permalink / raw) To: Sheng Yang; +Cc: Sheng Yang, KVM list, Avi Kivity, Andrea Arcangeli Am 17.10.2008 um 20:17 schrieb Sheng Yang <yasker@gmail.com>: > On Fri, Oct 17, 2008 at 07:47:39PM +0200, Alexander Graf wrote: >> >> On 17.10.2008, at 19:25, Sheng Yang wrote: >> >>> On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: >>>> Hi, >>>> >>>> I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS >>>> is >>>> not set. Is this intended? If so, it might be nice to put a >>>> configure- >>>> check or #error somewhere to tell the user that enabling mmu >>>> notifiers >>>> became mandatory. >>> >>> Yeah, I think it's intended. In fact, it was selected by KVM >>> , so if you compile a kernel with KVM, I think it would work... >> >> Well - it makes it pretty hard to build KVM as an external module >> (which >> I prefer due to many reasons) and I've actually had a problem to >> find the >> option in make menuconfig somewhere - is it even selectable? > > CONFIG_MMU_NOITFIER? No... It's automatically selected, if you > select KVM, > either in-kernel or module. Please refer to arch/x86/kvm/Kconfig. So if I don't select kvm in the kernel (either as module or compiled in) I can't build an external module providing kvm's functionality? That doesn't seem really useful to me... Alex > > -- > regards > Yang, Sheng >> >> Alex >> > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 18:36 ` Alexander Graf @ 2008-10-17 19:25 ` Andrea Arcangeli 2008-10-18 10:51 ` Avi Kivity 1 sibling, 0 replies; 11+ messages in thread From: Andrea Arcangeli @ 2008-10-17 19:25 UTC (permalink / raw) To: Alexander Graf; +Cc: Sheng Yang, KVM list, Avi Kivity Hi Alexander, On Fri, Oct 17, 2008 at 08:36:08PM +0200, Alexander Graf wrote: > So if I don't select kvm in the kernel (either as module or compiled in) I > can't build an external module providing kvm's functionality? That doesn't > seem really useful to me... The external module is supposed to still build against older kernels that don't have mmu notifier functionality at all regardless of their build config. So it should build on latest kernel with kvm disabled too (as mentioned here, MMU_NOTIFIER isn't explicitly selectable, it gets set implicitly if kvm is selected), if it doesn't it's probably some glitch that needs fixing. Or perhaps if it's not a vanilla kernel you're building against and a third party patch interfering, just wondering. I'll try to reproduce with vanilla mainline to see if something broke, in any case you can post the build failure if the problem persists. Thanks! Andrea ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 18:36 ` Alexander Graf 2008-10-17 19:25 ` Andrea Arcangeli @ 2008-10-18 10:51 ` Avi Kivity 2008-10-18 11:12 ` Alexander Graf 1 sibling, 1 reply; 11+ messages in thread From: Avi Kivity @ 2008-10-18 10:51 UTC (permalink / raw) To: Alexander Graf; +Cc: Sheng Yang, KVM list, Andrea Arcangeli Alexander Graf wrote: > > So if I don't select kvm in the kernel (either as module or compiled > in) I can't build an external module providing kvm's functionality? > That doesn't seem really useful to me... > The external module hackball should detect that you don't have CONFIG_MMU_NOTIFIERS set and supply some compatibility glue. What error are you seeing? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-18 10:51 ` Avi Kivity @ 2008-10-18 11:12 ` Alexander Graf 2008-10-19 8:57 ` Avi Kivity 0 siblings, 1 reply; 11+ messages in thread From: Alexander Graf @ 2008-10-18 11:12 UTC (permalink / raw) To: Avi Kivity; +Cc: Sheng Yang, KVM list, Andrea Arcangeli On 18.10.2008, at 12:51, Avi Kivity wrote: > Alexander Graf wrote: >> >> So if I don't select kvm in the kernel (either as module or >> compiled in) I can't build an external module providing kvm's >> functionality? That doesn't seem really useful to me... >> > > The external module hackball should detect that you don't have > CONFIG_MMU_NOTIFIERS set and supply some compatibility glue. What > error are you seeing? Basically struct mmu_notifier is not found, but requested by the code: rm -f include/asm include-compat/asm ln -sf asm-x86 include/asm ln -sf asm-x86 include-compat/asm make -C /usr/src/linux-obj/i586/default M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -Iinclude \ -Iinclude2 -I/lib/modules/2.6.27.1-2-default/source/include \ -Iarch/x86/include -I`pwd`/include-compat \ -include include/linux/autoconf.h \ -include `pwd`/x86/external-module-compat.h " make[1]: Entering directory `/usr/src/linux-2.6.27.1-2-obj/i386/default' make -C ../../../linux-2.6.27.1-2 O=/usr/src/linux-2.6.27.1-2-obj/i386/ default/. LD /usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/ built-in.o CC [M] /usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/svm.o In file included from /usr/src/packages/BUILD/kvm-77/suse-kernel/ default/x86/svm.c:16: /usr/src/packages/BUILD/kvm-77/suse-kernel/default/include/linux/ kvm_host.h:128: error: field 'mmu_notifier' has incomplete type make[5]: *** [/usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/ svm.o] Error 1 make[4]: *** [/usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86] Error 2 make[3]: *** [_module_/usr/src/packages/BUILD/kvm-77/suse-kernel/ default] Error 2 make[2]: *** [sub-make] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.27.1-2-obj/i386/default' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.20019 (%build) When I remove the struct references it breaks later on due to missing(?) inline functions. Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-18 11:12 ` Alexander Graf @ 2008-10-19 8:57 ` Avi Kivity 0 siblings, 0 replies; 11+ messages in thread From: Avi Kivity @ 2008-10-19 8:57 UTC (permalink / raw) To: Alexander Graf; +Cc: Sheng Yang, KVM list, Andrea Arcangeli Alexander Graf wrote: > > On 18.10.2008, at 12:51, Avi Kivity wrote: > >> Alexander Graf wrote: >>> >>> So if I don't select kvm in the kernel (either as module or compiled >>> in) I can't build an external module providing kvm's functionality? >>> That doesn't seem really useful to me... >>> >> >> The external module hackball should detect that you don't have >> CONFIG_MMU_NOTIFIERS set and supply some compatibility glue. What >> error are you seeing? > > Basically struct mmu_notifier is not found, but requested by the code: > > rm -f include/asm include-compat/asm > ln -sf asm-x86 include/asm > ln -sf asm-x86 include-compat/asm > make -C /usr/src/linux-obj/i586/default M=`pwd` \ > LINUXINCLUDE="-I`pwd`/include -Iinclude \ > -Iinclude2 -I/lib/modules/2.6.27.1-2-default/source/include \ > -Iarch/x86/include -I`pwd`/include-compat \ > -include include/linux/autoconf.h \ > -include `pwd`/x86/external-module-compat.h " > make[1]: Entering directory `/usr/src/linux-2.6.27.1-2-obj/i386/default' > make -C ../../../linux-2.6.27.1-2 > O=/usr/src/linux-2.6.27.1-2-obj/i386/default/. > LD > /usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/built-in.o > CC [M] /usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/svm.o > In file included from > /usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/svm.c:16: > /usr/src/packages/BUILD/kvm-77/suse-kernel/default/include/linux/kvm_host.h:128: > error: field 'mmu_notifier' has incomplete type > make[5]: *** > [/usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86/svm.o] Error 1 > make[4]: *** [/usr/src/packages/BUILD/kvm-77/suse-kernel/default/x86] > Error 2 > make[3]: *** > [_module_/usr/src/packages/BUILD/kvm-77/suse-kernel/default] Error 2 > make[2]: *** [sub-make] Error 2 > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/usr/src/linux-2.6.27.1-2-obj/i386/default' > make: *** [all] Error 2 > error: Bad exit status from /var/tmp/rpm-tmp.20019 (%build) > > When I remove the struct references it breaks later on due to > missing(?) inline functions. > Yes, there is an alternate definition in kernel/include-compat/linux/mmu_notifier.h, but it doesn't get included since the host's mmu_notifier.h has priority; and the host doesn't define the structure if !CONFIG_MMU_NOTIFIERS. I recommend configuring the host with KVM and throwing the modules away if you want the external module. You'll get better functionality so it's worth the minor hassle. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-17 18:17 ` Sheng Yang 2008-10-17 18:36 ` Alexander Graf @ 2008-10-18 7:21 ` Nikola Ciprich 2008-10-18 10:52 ` Avi Kivity 1 sibling, 1 reply; 11+ messages in thread From: Nikola Ciprich @ 2008-10-18 7:21 UTC (permalink / raw) To: Alexander Graf, Sheng Yang, KVM list, Avi Kivity, Andrea Arcangeli Cc: nikola.ciprich [-- Attachment #1: Type: text/plain, Size: 2057 bytes --] Hi, I've been stumbling to same problems building kernel packages for our distro - I've made small patches which allow enabling MMU notifier and also preempt notifiers on kernel with KVM disabled (to allow building external always fresh KVM). I'm attaching those, hope it helps. Actually, Avi, do You thing souch patches could be pushed upstream? It doesn't hurt anything to have such a choice no? If so, I can send git style patches ;) regards nik On Sat, Oct 18, 2008 at 02:17:27AM +0800, Sheng Yang wrote: > On Fri, Oct 17, 2008 at 07:47:39PM +0200, Alexander Graf wrote: > > > > On 17.10.2008, at 19:25, Sheng Yang wrote: > > > >> On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: > >>> Hi, > >>> > >>> I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS > >>> is > >>> not set. Is this intended? If so, it might be nice to put a > >>> configure- > >>> check or #error somewhere to tell the user that enabling mmu > >>> notifiers > >>> became mandatory. > >> > >> Yeah, I think it's intended. In fact, it was selected by KVM > >> , so if you compile a kernel with KVM, I think it would work... > > > > Well - it makes it pretty hard to build KVM as an external module (which > > I prefer due to many reasons) and I've actually had a problem to find the > > option in make menuconfig somewhere - is it even selectable? > > CONFIG_MMU_NOITFIER? No... It's automatically selected, if you select KVM, > either in-kernel or module. Please refer to arch/x86/kvm/Kconfig. > -- > regards > Yang, Sheng > > > > Alex > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- ------------------------------------- Nikola CIPRICH LinuxBox.cz, s.r.o. 28. rijna 168, 709 01 Ostrava tel.: +420 596 603 142 fax: +420 596 621 273 mobil: +420 777 093 799 www.linuxbox.cz mobil servis: +420 737 238 656 email servis: servis@linuxbox.cz ------------------------------------- [-- Attachment #2: linux-2.6.25-enable-preempt-notifiers.diff --] [-- Type: text/plain, Size: 684 bytes --] diff -Naur linux-2.6.25/init/Kconfig linux-2.6.25-enable-preempt-notifiers/init/Kconfig --- linux-2.6.25/init/Kconfig 2008-06-10 02:51:26.000000000 -0400 +++ linux-2.6.25-enable-preempt-notifiers/init/Kconfig 2008-06-10 03:09:18.000000000 -0400 @@ -800,6 +800,11 @@ /proc/kpagecount, and /proc/kpageflags. Disabling these interfaces will reduce the size of the kernel by approximately 4kb. +config PREEMPT_NOTIFIERS + bool "Enable preempt notifiers" + help + Enable preempt notifiers + endmenu # General setup config SLABINFO @@ -913,9 +918,6 @@ source "block/Kconfig" -config PREEMPT_NOTIFIERS - bool - config CLASSIC_RCU def_bool !PREEMPT_RCU help [-- Attachment #3: linux-2.6.27-enable-mmu-notifier.diff --] [-- Type: text/plain, Size: 373 bytes --] diff -Naur linux-2.6.27/mm/Kconfig linux-2.6.27-enable-mmu-notifier/mm/Kconfig --- linux-2.6.27/mm/Kconfig 2008-10-10 00:13:53.000000000 +0200 +++ linux-2.6.27-enable-mmu-notifier/mm/Kconfig 2008-10-12 15:10:21.000000000 +0200 @@ -207,4 +207,7 @@ depends on !ARCH_NO_VIRT_TO_BUS config MMU_NOTIFIER - bool + bool "Enable MMU notifier" + help + Enable MMU notifier + ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Build failure w/o mmu notifiers 2008-10-18 7:21 ` Nikola Ciprich @ 2008-10-18 10:52 ` Avi Kivity 0 siblings, 0 replies; 11+ messages in thread From: Avi Kivity @ 2008-10-18 10:52 UTC (permalink / raw) To: Nikola Ciprich Cc: Alexander Graf, Sheng Yang, KVM list, Andrea Arcangeli, nikola.ciprich Nikola Ciprich wrote: > Hi, > I've been stumbling to same problems building kernel packages for our distro - > I've made small patches which allow enabling MMU notifier and also preempt notifiers > on kernel with KVM disabled (to allow building external always fresh KVM). > I'm attaching those, hope it helps. > Actually, Avi, do You thing souch patches could be pushed upstream? It doesn't > hurt anything to have such a choice no? > More choices to confuse users; and these choices aren't helpful for ordinary builds (which don't have external modules). You can always select KVM and ignore the modules generated. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-10-19 8:57 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-17 16:34 Build failure w/o mmu notifiers Alexander Graf 2008-10-17 17:25 ` Sheng Yang 2008-10-17 17:47 ` Alexander Graf 2008-10-17 18:17 ` Sheng Yang 2008-10-17 18:36 ` Alexander Graf 2008-10-17 19:25 ` Andrea Arcangeli 2008-10-18 10:51 ` Avi Kivity 2008-10-18 11:12 ` Alexander Graf 2008-10-19 8:57 ` Avi Kivity 2008-10-18 7:21 ` Nikola Ciprich 2008-10-18 10:52 ` Avi Kivity
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.