summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-02-01 15:23:24 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2011-02-01 15:32:18 -0600
commitb3a98367eec7b2d87acca54ef5e4de3b0e0a7ed5 (patch)
tree22b6121e6f81c09c7dd780ed211afef7b9ebb92d /configure
parent9363ee31ab53fc0fd39fbe5936d9c00a2f4e54a4 (diff)
parentc5999bfcfdf66390c98115044cb6fd174fbcf36d (diff)
downloadhqemu-b3a98367eec7b2d87acca54ef5e4de3b0e0a7ed5.zip
hqemu-b3a98367eec7b2d87acca54ef5e4de3b0e0a7ed5.tar.gz
Merge remote branch 'qemu-kvm/uq/master' into staging
aliguori: fix build with !defined(KVM_CAP_ASYNC_PF) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 26 insertions, 10 deletions
diff --git a/configure b/configure
index 81573b9..598e8e1 100755
--- a/configure
+++ b/configure
@@ -1663,15 +1663,31 @@ if test "$kvm" != "no" ; then
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
#error Invalid KVM version
#endif
-#if !defined(KVM_CAP_USER_MEMORY)
-#error Missing KVM capability KVM_CAP_USER_MEMORY
-#endif
-#if !defined(KVM_CAP_SET_TSS_ADDR)
-#error Missing KVM capability KVM_CAP_SET_TSS_ADDR
-#endif
-#if !defined(KVM_CAP_DESTROY_MEMORY_REGION_WORKS)
-#error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS
+EOF
+ must_have_caps="KVM_CAP_USER_MEMORY \
+ KVM_CAP_DESTROY_MEMORY_REGION_WORKS \
+ KVM_CAP_COALESCED_MMIO \
+ KVM_CAP_SYNC_MMU \
+ "
+ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) ; then
+ must_have_caps="$caps \
+ KVM_CAP_SET_TSS_ADDR \
+ KVM_CAP_EXT_CPUID \
+ KVM_CAP_CLOCKSOURCE \
+ KVM_CAP_NOP_IO_DELAY \
+ KVM_CAP_PV_MMU \
+ KVM_CAP_MP_STATE \
+ KVM_CAP_USER_NMI \
+ "
+ fi
+ for c in $must_have_caps ; do
+ cat >> $TMPC <<EOF
+#if !defined($c)
+#error Missing KVM capability $c
#endif
+EOF
+ done
+ cat >> $TMPC <<EOF
int main(void) { return 0; }
EOF
if test "$kerneldir" != "" ; then
@@ -1706,8 +1722,8 @@ EOF
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
if test "$kvmerr" != "" ; then
echo -e "${kvmerr}\n\
- NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
- recent kvm-kmod from http://sourceforge.net/projects/kvm."
+NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
+recent kvm-kmod from http://sourceforge.net/projects/kvm."
fi
fi
feature_not_found "kvm"
OpenPOWER on IntegriCloud