Re: The compiling of lastest KVM user space code FAIL on the lastest kernel tree

Avi Kivity
2009-04-07T10:47:21Z

Zhiyong Wu wrote:
> HI,
>
> when compiling kvm user space on the lastest kernel tree,
>
> the compile FAIL; but on 2.6.29, this compile has succeeded.
>
> The version of the lastest kernel tree is
>
> [root@fedora9 linux-2.6 {master}]$ git describe
> v2.6.29-9854-gd508afb
>
> [root@fedora9 kvm-userspace {master}]$ make
> .......
> rm -f include/asm include-compat/asm
> ln -sf asm-x86 include/asm
> ln -sf asm-x86 include-compat/asm
> make -C /home/zwu/kernel/linux-2.6/ M=`pwd` \
> LINUXINCLUDE="-I`pwd`/include -Iinclude \
> \
> -Iarch/x86/include -I`pwd`/include-compat \
> -include include/linux/autoconf.h \
> -include `pwd`/x86/external-module-compat.h "
> make[2]: Entering directory `/home/zwu/kernel/linux-2.6'
> CC [M] /home/zwu/virt/kvm-userspace/kernel/x86/svm.o
> In file included from /home/zwu/virt/kvm-userspace/kernel/x86/svm.c:57:
> /home/zwu/virt/kvm-userspace/kernel/include/linux/kvm_host.h:191:
> error: field \u2018mmu_notifier\u2019 has incomplete type
> make[4]: *** [/home/zwu/virt/kvm-userspace/kernel/x86/svm.o] Error 1
> make[3]: *** [/home/zwu/virt/kvm-userspace/kernel/x86] Error 2
> make[2]: *** [_module_/home/zwu/virt/kvm-userspace/kernel] Error 2
> make[2]: Leaving directory `/home/zwu/kernel/linux-2.6'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/zwu/virt/kvm-userspace/kernel'
> make: *** [kernel] Error 2
>
> It seems that the macro "CONFIG_MMU_NOTIFIER" is undefined in the
> lastest kernel tree.
>

You need to select CONFIG_KVM in your .config; that will enable
CONFIG_MMU_NOTIFIER.

--
error compiling committee.c: too many arguments to function