diff options
author | Alexander Graf <agraf@suse.de> | 2011-04-16 02:00:36 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-05-09 22:31:38 +0200 |
commit | 64e07be544ee9c5fb5b741175262fd34726ec431 (patch) | |
tree | 77b4b2606b970d920f53ed0c89a4a8b165135b90 /configure | |
parent | 90dc8812229a1d3f31bc08ccf0aa50e10282faef (diff) |
kvm: ppc: detect old headers
When compiling Qemu with older kernel headers, the PVR setting
mechanism isn't available yet. Unfortunately, back then I didn't add
a capability we could check against, so all we can do is add a configure
test to see if we support PVR setting. For BookE, we don't care yet.
This fixes compilation errors with KVM enabled on older kernel headers
(like 2.6.32).
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1772,6 +1772,21 @@ recent kvm-kmod from http://sourceforge.net/projects/kvm." fi ########################################## +# test for ppc kvm pvr setting + +if test "$kvm" = "yes" && test "$cpu" = "ppc" -o "$cpu" = "ppc64"; then + cat > $TMPC <<EOF + #include <asm/kvm.h> + int main(void) { struct kvm_sregs s; s.pvr = 0; return 0; } +EOF + if compile_prog "$kvm_cflags" "" ; then + kvm_ppc_pvr=yes + else + kvm_ppc_pvr=no + fi +fi + +########################################## # test for vhost net if test "$vhost_net" != "no"; then @@ -3257,6 +3272,9 @@ case "$target_arch2" in if test $vhost_net = "yes" ; then echo "CONFIG_VHOST_NET=y" >> $config_target_mak fi + if test $kvm_ppc_pvr = "yes" ; then + echo "CONFIG_KVM_PPC_PVR=y" >> $config_target_mak + fi fi esac if test "$target_bigendian" = "yes" ; then |