Blame 0002-configure-Add-disable-kvm-options.patch

c5cd36
From b652c0572859e594fe8d1fc9fd2289126a4c3a1b Mon Sep 17 00:00:00 2001
c5cd36
From: Cole Robinson <crobinso@redhat.com>
c5cd36
Date: Mon, 13 Aug 2012 18:39:54 -0400
c5cd36
Subject: [PATCH] configure: Add --disable-kvm-options
c5cd36
c5cd36
In Fedora, our qemu package is based on qemu-kvm, and we go to convoluted
c5cd36
lengths to provide a qemu-kvm binary with KVM on by default, but all
c5cd36
qemu-system-* with KVM off by default (using ./configure --disable-kvm)
c5cd36
c5cd36
For qemu-system*, what we really want is upstream qemu symantics of TCG
c5cd36
by default, but the opt in option for KVM. CONFIG_KVM_OPTIONS fits the
c5cd36
bill, so let's expose it through ./configure. This will also simplify
c5cd36
our packaging for non-x86 KVM.
c5cd36
c5cd36
Signed-off-by: Cole Robinson <crobinso@redhat.com>
c5cd36
---
c5cd36
 configure | 11 ++++++++++-
c5cd36
 1 file changed, 10 insertions(+), 1 deletion(-)
c5cd36
c5cd36
diff --git a/configure b/configure
c5cd36
index 6b66d34..8f4d9e3 100755
c5cd36
--- a/configure
c5cd36
+++ b/configure
c5cd36
@@ -189,6 +189,7 @@ guest_base=""
c5cd36
 uname_release=""
c5cd36
 mixemu="no"
c5cd36
 kvm_cap_device_assignment="yes"
c5cd36
+kvmoptions="yes"
c5cd36
 aix="no"
c5cd36
 blobs="yes"
c5cd36
 pkgversion=" ($(kvm_version))"
c5cd36
@@ -707,6 +708,8 @@ for opt do
c5cd36
   ;;
c5cd36
   --enable-kvm) kvm="yes"
c5cd36
   ;;
c5cd36
+  --disable-kvm-options) kvmoptions="no"
c5cd36
+  ;;
c5cd36
   --disable-tcg-interpreter) tcg_interpreter="no"
c5cd36
   ;;
c5cd36
   --enable-tcg-interpreter) tcg_interpreter="yes"
c5cd36
@@ -1071,6 +1074,8 @@ echo "  --enable-bluez           enable bluez stack connectivity"
c5cd36
 echo "  --disable-slirp          disable SLIRP userspace network connectivity"
c5cd36
 echo "  --disable-kvm            disable KVM acceleration support"
c5cd36
 echo "  --enable-kvm             enable KVM acceleration support"
c5cd36
+echo "  --disable-kvm-options    if KVM is enabled, default to KVM=off, and"
c5cd36
+echo "                           remove non-upstream cli options"
c5cd36
 echo "  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
c5cd36
 echo "  --disable-kvm-device-assignment  disable KVM device assignment support"
c5cd36
 echo "  --enable-kvm-device-assignment   enable KVM device assignment support"
c5cd36
@@ -3101,6 +3106,7 @@ echo "Install blobs     $blobs"
c5cd36
 echo "KVM support       $kvm"
c5cd36
 echo "TCG interpreter   $tcg_interpreter"
c5cd36
 echo "KVM device assig. $kvm_cap_device_assignment"
c5cd36
+echo "KVM CLI options   $kvmoptions"
c5cd36
 echo "fdt support       $fdt"
c5cd36
 echo "preadv support    $preadv"
c5cd36
 echo "fdatasync         $fdatasync"
c5cd36
@@ -3818,7 +3824,10 @@ case "$target_arch2" in
c5cd36
       \( "$target_arch2" = "x86_64" -a "$cpu" = "i386"   \) -o \
c5cd36
       \( "$target_arch2" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
c5cd36
       echo "CONFIG_KVM=y" >> $config_target_mak
c5cd36
-      echo "CONFIG_KVM_OPTIONS=y" >> $config_host_mak
c5cd36
+
c5cd36
+      if test "$kvmoptions" = "yes" ; then
c5cd36
+        echo "CONFIG_KVM_OPTIONS=y" >> $config_host_mak
c5cd36
+      fi
c5cd36
       if test "$vhost_net" = "yes" ; then
c5cd36
         echo "CONFIG_VHOST_NET=y" >> $config_target_mak
c5cd36
       fi
c5cd36
-- 
c5cd36
1.7.11.2
c5cd36