Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxoXJ-00081i-1C for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxoXG-00081O-Uj for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:27 -0500 Received: from [199.232.76.173] (port=53821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxoXG-00081H-PJ for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:26 -0500 Received: from savannah.gnu.org ([199.232.41.3]:56476 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KxoXG-0003WN-CF for qemu-devel@nongnu.org; Wed, 05 Nov 2008 14:59:26 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KxoXF-0006r8-M8 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 19:59:25 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KxoXF-0006r4-Fc for qemu-devel@nongnu.org; Wed, 05 Nov 2008 19:59:25 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Wed, 05 Nov 2008 19:59:25 +0000 Subject: [Qemu-devel] [5631] Allow KVM to be used on either 32-bit or 64-bit x86 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5631 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5631 Author: aliguori Date: 2008-11-05 19:59:25 +0000 (Wed, 05 Nov 2008) Log Message: ----------- Allow KVM to be used on either 32-bit or 64-bit x86 Inspired by a patch from Glauber Costa. Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/configure Modified: trunk/configure =================================================================== --- trunk/configure 2008-11-05 19:25:39 UTC (rev 5630) +++ trunk/configure 2008-11-05 19:59:25 UTC (rev 5631) @@ -1447,8 +1447,10 @@ echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h gdb_xml_files="" -# FIXME allow i386 to build on x86_64 and vice versa -if test "$kvm" = "yes" -a "$target_cpu" != "$cpu" ; then +# Make sure the target and host cpus are compatible +if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \ + \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \ + \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then kvm="no" fi # Disable KVM for linux-user @@ -1468,7 +1470,7 @@ if test "$kvm" = "yes" ; then echo "CONFIG_KVM=yes" >> $config_mak echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak - echo "#define CONFIG_KVM" >> $config_h + echo "#define CONFIG_KVM 1" >> $config_h fi gcc3minver=`$cc --version 2> /dev/null| fgrep "(GCC) 3." | awk '{ print $3 }' | cut -f2 -d.` if test -n "$gcc3minver" && test $gcc3minver -gt 3