qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] qemu: fix configuring kvm probe when using --ke


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH] qemu: fix configuring kvm probe when using --kerneldir
Date: Fri, 09 Jan 2009 14:05:22 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

address@hidden wrote:
From: Christian Ehrhardt <address@hidden>

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 <address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori

---

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]