summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:13:10 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:13:10 -0500
commitd6034a3a61235042a0d79dcc1dfed0fbf461fb18 (patch)
tree78625b5d83f8b8410fccc9c008e201da11697449 /configure
parentfdba9594df8eb2e2ac16bba95308e4159ffbb9e4 (diff)
parentca98557ad2510eaeb6538b4c4d9972818e83b6c2 (diff)
downloadqemu-d6034a3a61235042a0d79dcc1dfed0fbf461fb18.tar.gz
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure149
1 files changed, 17 insertions, 132 deletions
diff --git a/configure b/configure
index b63b49f1d1..856b41eea6 100755
--- a/configure
+++ b/configure
@@ -113,8 +113,7 @@ curl=""
curses=""
docs=""
fdt=""
-kvm=""
-kvm_para=""
+kvm="yes"
nptl=""
sdl=""
vnc="yes"
@@ -130,7 +129,7 @@ xen=""
xen_ctrl_version=""
linux_aio=""
attr=""
-vhost_net=""
+vhost_net="yes"
xfs=""
gprof="no"
@@ -166,7 +165,6 @@ guest_base=""
uname_release=""
io_thread="no"
mixemu="no"
-kerneldir=""
aix="no"
blobs="yes"
pkgversion=""
@@ -715,8 +713,6 @@ for opt do
;;
--disable-blobs) blobs="no"
;;
- --kerneldir=*) kerneldir="$optarg"
- ;;
--with-pkgversion=*) pkgversion=" ($optarg)"
;;
--disable-docs) docs="no"
@@ -1005,7 +1001,6 @@ echo " --disable-attr disables attr and xattr support"
echo " --enable-attr enable attr and xattr support"
echo " --enable-io-thread enable IO thread"
echo " --disable-blobs disable installing provided firmware blobs"
-echo " --kerneldir=PATH look for kernel includes in PATH"
echo " --enable-docs enable documentation build"
echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
@@ -1806,124 +1801,6 @@ EOF
fi
##########################################
-# kvm probe
-if test "$kvm" != "no" ; then
- cat > $TMPC <<EOF
-#include <linux/kvm.h>
-#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
-#error Invalid KVM version
-#endif
-EOF
- must_have_caps="KVM_CAP_USER_MEMORY \
- KVM_CAP_DESTROY_MEMORY_REGION_WORKS \
- KVM_CAP_COALESCED_MMIO \
- KVM_CAP_SYNC_MMU \
- "
- if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) ; then
- must_have_caps="$caps \
- KVM_CAP_SET_TSS_ADDR \
- KVM_CAP_EXT_CPUID \
- KVM_CAP_CLOCKSOURCE \
- KVM_CAP_NOP_IO_DELAY \
- KVM_CAP_PV_MMU \
- KVM_CAP_MP_STATE \
- KVM_CAP_USER_NMI \
- "
- fi
- for c in $must_have_caps ; do
- cat >> $TMPC <<EOF
-#if !defined($c)
-#error Missing KVM capability $c
-#endif
-EOF
- done
- cat >> $TMPC <<EOF
-int main(void) { return 0; }
-EOF
- if test "$kerneldir" != "" ; then
- kvm_cflags=-I"$kerneldir"/include
- if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) \
- -a -d "$kerneldir/arch/x86/include" ; then
- kvm_cflags="$kvm_cflags -I$kerneldir/arch/x86/include"
- elif test "$cpu" = "ppc" -a -d "$kerneldir/arch/powerpc/include" ; then
- kvm_cflags="$kvm_cflags -I$kerneldir/arch/powerpc/include"
- elif test "$cpu" = "s390x" -a -d "$kerneldir/arch/s390/include" ; then
- kvm_cflags="$kvm_cflags -I$kerneldir/arch/s390/include"
- elif test -d "$kerneldir/arch/$cpu/include" ; then
- kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include"
- fi
- else
- kvm_cflags=`$pkg_config --cflags kvm-kmod 2>/dev/null`
- fi
- if compile_prog "$kvm_cflags" "" ; then
- kvm=yes
- cat > $TMPC <<EOF
-#include <linux/kvm_para.h>
-int main(void) { return 0; }
-EOF
- if compile_prog "$kvm_cflags" "" ; then
- kvm_para=yes
- fi
- else
- if test "$kvm" = "yes" ; then
- if has awk && has grep; then
- kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
- | grep "error: " \
- | awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
- if test "$kvmerr" != "" ; then
- echo -e "${kvmerr}\n\
-NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
-recent kvm-kmod from http://sourceforge.net/projects/kvm."
- fi
- fi
- feature_not_found "kvm"
- fi
- kvm=no
- fi
-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
- if test "$kvm" != "no"; then
- cat > $TMPC <<EOF
- #include <linux/vhost.h>
- int main(void) { return 0; }
-EOF
- if compile_prog "$kvm_cflags" "" ; then
- vhost_net=yes
- else
- if test "$vhost_net" = "yes" ; then
- feature_not_found "vhost-net"
- fi
- vhost_net=no
- fi
- else
- if test "$vhost_net" = "yes" ; then
- echo "NOTE: vhost-net feature requires KVM (--enable-kvm)."
- feature_not_found "vhost-net"
- fi
- vhost_net=no
- fi
-fi
-
-##########################################
# pthread probe
PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
@@ -3373,16 +3250,9 @@ case "$target_arch2" in
\( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
\( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
echo "CONFIG_KVM=y" >> $config_target_mak
- echo "KVM_CFLAGS=$kvm_cflags" >> $config_target_mak
- if test "$kvm_para" = "yes"; then
- echo "CONFIG_KVM_PARA=y" >> $config_target_mak
- fi
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
@@ -3573,6 +3443,21 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
esac
fi
+# use included Linux headers
+includes="-I\$(SRC_PATH)/linux-headers $includes"
+mkdir -p linux-headers
+case "$cpu" in
+i386|x86_64)
+ symlink $source_path/linux-headers/asm-x86 linux-headers/asm
+ ;;
+ppcemb|ppc|ppc64)
+ symlink $source_path/linux-headers/asm-x86 linux-headers/asm
+ ;;
+s390x)
+ symlink $source_path/linux-headers/asm-s390 linux-headers/asm
+ ;;
+esac
+
echo "LDFLAGS+=$ldflags" >> $config_target_mak
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
echo "QEMU_INCLUDES+=$includes" >> $config_target_mak