From patchwork Fri Jan 9 12:10:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ehrhardt@linux.vnet.ibm.com X-Patchwork-Id: 1574 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n09C7rTZ013368 for ; Fri, 9 Jan 2009 04:07:53 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752804AbZAIMLf (ORCPT ); Fri, 9 Jan 2009 07:11:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752828AbZAIMLf (ORCPT ); Fri, 9 Jan 2009 07:11:35 -0500 Received: from mtagate7.de.ibm.com ([195.212.29.156]:36033 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbZAIMLe (ORCPT ); Fri, 9 Jan 2009 07:11:34 -0500 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id n09CAsc4185764 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 n09CAssP3268828 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 n09CAsbk023571 for ; Fri, 9 Jan 2009 13:10:54 +0100 Received: from localhost.localdomain (dyn-9-152-212-28.boeblingen.de.ibm.com [9.152.212.28]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n09CAsCo023568; Fri, 9 Jan 2009 13:10:54 +0100 From: ehrhardt@linux.vnet.ibm.com To: aliguori@us.ibm.com Cc: ehrhardt@linux.vnet.ibm.com, avi@qumranet.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [PATCH] qemu: fix configuring kvm probe when using --kerneldir Date: Fri, 9 Jan 2009 13:10:54 +0100 Message-Id: <1231503054-10618-1-git-send-email-ehrhardt@linux.vnet.ibm.com> X-Mailer: git-send-email 1.5.4.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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] -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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