From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LLGCg-0001Mw-D1 for qemu-devel@nongnu.org; Fri, 09 Jan 2009 07:11:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LLGCe-0001Ly-FE for qemu-devel@nongnu.org; Fri, 09 Jan 2009 07:11:06 -0500 Received: from [199.232.76.173] (port=45928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLGCe-0001Lt-Ca for qemu-devel@nongnu.org; Fri, 09 Jan 2009 07:11:04 -0500 Received: from mtagate4.de.ibm.com ([195.212.29.153]:40633) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LLGCd-00009j-Qv for qemu-devel@nongnu.org; Fri, 09 Jan 2009 07:11:04 -0500 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id n09CAs38150704 for ; Fri, 9 Jan 2009 12:10:54 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n09CAs5J2875628 for ; Fri, 9 Jan 2009 13:10:54 +0100 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n09CAsbe023571 for ; Fri, 9 Jan 2009 13:10:54 +0100 From: ehrhardt@linux.vnet.ibm.com Date: Fri, 9 Jan 2009 13:10:54 +0100 Message-Id: <1231503054-10618-1-git-send-email-ehrhardt@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH] qemu: fix configuring kvm probe when using --kerneldir Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: ehrhardt@linux.vnet.ibm.com, qemu-devel@nongnu.org, avi@qumranet.com, kvm@vger.kernel.org From: Christian Ehrhardt There is already a variable kvm_cflags which gets the path of the kernel includes when using --kerneldir. But eventually with newer kernels we all will need arch/$arch/include too (my case was a incldue of asm/kvm.h which was not found anymore). Headers in a full kernel source are not flattened to one arch like they are if e.g. installed kernel headers are used. To fix that, the includes added to cflags depending on --kerneldir should also contian the arch includes. The patch adds a special check for x86 because its source layout recently changed, all others directly use arch/$cpu/include if existent. Signed-off-by: Christian Ehrhardt --- [diffstat] configure | 6 ++++++ 1 file changed, 6 insertions(+) [diff] diff --git a/configure b/configure --- a/configure +++ b/configure @@ -963,6 +963,12 @@ EOF 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 -d "$kerneldir/arch/$cpu/include" ; then + kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include" + fi else kvm_cflags="" fi