From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Build failure w/o mmu notifiers Date: Sun, 19 Oct 2008 10:57:24 +0200 Message-ID: <48FAF674.7060604@redhat.com> References: <82FBE772-34D5-4F2B-8DEC-82E41F15FC06@suse.de> <20081017172511.GC22408@yukikaze> <7605E571-6852-4944-81F0-8B6DCC50CBEB@suse.de> <20081017181727.GB24525@yukikaze> <16F9B349-9566-445E-9FF8-A1254AAFDA4F@suse.de> <48F9BF94.6070608@redhat.com> <6A5EF471-A7FF-4B50-9F9E-70272D6F9A04@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sheng Yang , KVM list , Andrea Arcangeli To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57708 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750698AbYJSI5d (ORCPT ); Sun, 19 Oct 2008 04:57:33 -0400 In-Reply-To: <6A5EF471-A7FF-4B50-9F9E-70272D6F9A04@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: 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