Re: kvm-kmod (Re: [PATCH v2] kvm: better MWAIT emulation for guests)
From: Paolo Bonzini
Date: Tue Mar 14 2017 - 06:53:54 EST
On 13/03/2017 21:18, Gabriel L. Somlo wrote:
> I'd like to test Michael's MWAIT patch on my copies of the affected
> OS X versions, and wanted to use kvm-kmod to build the latest KVM on
> my F24 box. I did:
>
> git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git
> git clone https://github.com/bonzini/kvm-kmod.git
> cd kvm-kmod
> ./configure
> make LINUX=../kvm clean sync all
>
> Then, I get a bunch of errors:
>
> make -C /lib/modules/4.9.10-100.fc24.x86_64/build M=`pwd` clean
> make[1]: Entering directory '/usr/src/kernels/4.9.10-100.fc24.x86_64'
> make[1]: Leaving directory '/usr/src/kernels/4.9.10-100.fc24.x86_64'
> ./sync -v for-linus -l ../kvm
> make -C /lib/modules/4.9.10-100.fc24.x86_64/build M=`pwd` \
> LINUXINCLUDE="-I`pwd`/include -I`pwd`/include/uapi -Iinclude \
> -Iinclude2 -I/lib/modules/4.9.10-100.fc24.x86_64/source/include -I/lib/modules/4.9.10-100.fc24.x86_64/source/include/uapi -I/lib/modules/4.9.10-100.fc24.x86_64/source/arch/x86/include -I/lib/modules/4.9.10-100.fc24.x86_64/source/arch/x86/include/uapi \
> -Iinclude/generated/uapi -Iarch/x86/include/generated \
> -Iarch/x86/include/generated/uapi \
> -I`pwd`/include-compat -I`pwd`/x86 \
> -include include/generated/autoconf.h \
> -include `pwd`/x86/external-module-compat.h" \
> "$@"
> make[1]: Entering directory '/usr/src/kernels/4.9.10-100.fc24.x86_64'
> LD /home/somlo/FOO/kvm-kmod/x86/built-in.o
> CC [M] /home/somlo/FOO/kvm-kmod/x86/kvm_main.o
> In file included from /home/somlo/FOO/kvm-kmod/x86/external-module-compat.h:46:,
> from <command-line>:0:
> /home/somlo/FOO/kvm-kmod/x86/../external-module-compat-comm.h:1724:53: warning:struct static_key_deferredâ declared inside parameter list will not be visible outside of this definition or declaration
> static inline void static_key_deferred_flush(struct static_key_deferred *key)
> ^~~~~~~~~~~~~~~~~~~
> /home/somlo/FOO/kvm-kmod/x86/../external-module-compat-comm.h: In function âstatic_key_deferred_flushâ:
> /home/somlo/FOO/kvm-kmod/x86/../external-module-compat-comm.h:1726:25: error: dereferencing pointer to incomplete type âstruct static_key_deferredâ
> flush_delayed_work(&key->work);
> ^~
> In file included from <command-line>:0:0:
> /home/somlo/FOO/kvm-kmod/x86/external-module-compat.h: At top level:
> /home/somlo/FOO/kvm-kmod/x86/external-module-compat.h:1090:22: fatal error: asm/i387.h: No such file or directory
> #include <asm/i387.h>
> ^
> compilation terminated.
> scripts/Makefile.build:293: recipe for target '/home/somlo/FOO/kvm-kmod/x86/kvm_main.o' failed
> make[3]: *** [/home/somlo/FOO/kvm-kmod/x86/kvm_main.o] Error 1
> scripts/Makefile.build:544: recipe for target '/home/somlo/FOO/kvm-kmod/x86' failed
> make[2]: *** [/home/somlo/FOO/kvm-kmod/x86] Error 2
> Makefile:1494: recipe for target '_module_/home/somlo/FOO/kvm-kmod' failed
> make[1]: *** [_module_/home/somlo/FOO/kvm-kmod] Error 2
> make[1]: Leaving directory '/usr/src/kernels/4.9.10-100.fc24.x86_64'
> Makefile:21: recipe for target 'all' failed
> make: *** [all] Error 2
>
> Any idea where things might be going wrong?
> Is F24 (4.9.10-100.fc24.x86_64) too old for this?
Let me push a newer version of kvm-kmod. But I only tested it with 4.11.
Paolo