qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu: fix configuring kvm probe when using --kerneldir
@ 2009-01-09 12:10 ehrhardt
  2009-01-09 14:36 ` [Qemu-devel] " Andre Przywara
  2009-01-09 20:05 ` Anthony Liguori
  0 siblings, 2 replies; 4+ messages in thread
From: ehrhardt @ 2009-01-09 12:10 UTC (permalink / raw)
  To: aliguori; +Cc: ehrhardt, qemu-devel, avi, kvm

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

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 <ehrhardt@linux.vnet.ibm.com>
---

[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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-12  6:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 12:10 [Qemu-devel] [PATCH] qemu: fix configuring kvm probe when using --kerneldir ehrhardt
2009-01-09 14:36 ` [Qemu-devel] " Andre Przywara
2009-01-12  6:42   ` Christian Ehrhardt
2009-01-09 20:05 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).