From patchwork Wed Aug 12 16:29:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 31221 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 026E7B6EDF for ; Thu, 13 Aug 2009 03:05:29 +1000 (EST) Received: from localhost ([127.0.0.1]:42168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbHGK-0004Sw-Mn for incoming@patchwork.ozlabs.org; Wed, 12 Aug 2009 13:05:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbGkV-0008Ft-NP for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:32:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbGkN-00081h-RU for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:32:23 -0400 Received: from [199.232.76.173] (port=39166 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbGkM-00080Q-Ea for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:32:18 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55718) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbGkL-0004Kf-JS for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:32:17 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7CGWHPj018341 for ; Wed, 12 Aug 2009 12:32:17 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7CGWGq1015793; Wed, 12 Aug 2009 12:32:16 -0400 Received: from localhost.localdomain (vpn-12-196.rdu.redhat.com [10.11.12.196]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7CGW57E003505; Wed, 12 Aug 2009 12:32:15 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 12 Aug 2009 18:29:56 +0200 Message-Id: <1dabe4d4bf7a17bd21b899a9d555d20883b03746.1250093910.git.quintela@redhat.com> In-Reply-To: <71025e96da7eb85957e11d9cf4530c1ee81577d5.1250093910.git.quintela@redhat.com> References: <71025e96da7eb85957e11d9cf4530c1ee81577d5.1250093910.git.quintela@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH 19/20] Add kvm to new feature convention X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Extra error message is only given if --enable-kvm was given Signed-off-by: Juan Quintela --- configure | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 66e4208..009ecef 100755 --- a/configure +++ b/configure @@ -185,6 +185,7 @@ curl="" curses="" docs="" fdt="" +kvm="" nptl="" pthread="" sdl="" @@ -220,7 +221,6 @@ uname_release="" aio="yes" io_thread="no" mixemu="no" -kvm="no" kerneldir="" aix="no" blobs="yes" @@ -355,7 +355,6 @@ AIX) linux="yes" linux_user="yes" usb="linux" - kvm="yes" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" audio_possible_drivers="$audio_possible_drivers fmod" @@ -488,6 +487,8 @@ for opt do ;; --disable-kvm) kvm="no" ;; + --enable-kvm) kvm="yes" + ;; --enable-profiler) profiler="yes" ;; --enable-cocoa) @@ -678,6 +679,7 @@ echo " --enable-fdt enable fdt device tree" echo " --disable-bluez disable bluez stack connectivity" echo " --enable-bluez enable bluez stack connectivity" echo " --disable-kvm disable KVM acceleration support" +echo " --enable-kvm enable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" echo " --enable-nptl disable usermode NPTL support" echo " --enable-system enable all system emulation targets" @@ -1245,7 +1247,7 @@ fi ########################################## # kvm probe -if test "$kvm" = "yes" ; then +if test "$kvm" != "no" ; then cat > $TMPC < #if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12 @@ -1276,20 +1278,23 @@ EOF kvm_cflags="" fi if compile_prog "$kvm_cflags" "" ; then - : + kvm=yes else - kvm="no"; - if [ -x "`which awk 2>/dev/null`" ] && \ - [ -x "`which grep 2>/dev/null`" ]; then - kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \ + if test "$kvm" = "yes" ; then + if [ -x "`which awk 2>/dev/null`" ] && \ + [ -x "`which grep 2>/dev/null`" ]; 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 - kvm="no - (${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." + 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 @@ -1663,7 +1668,7 @@ echo "vde support $vde" echo "AIO support $aio" echo "IO thread $io_thread" echo "Install blobs $blobs" -echo -e "KVM support $kvm" +echo "KVM support $kvm" echo "fdt support $fdt" echo "preadv support $preadv"