dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

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

5544c1
From b80fff00ed7f9baff808edb6c2c9f98f7e75e8ca 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
5544c1
index f019526..933754d 100755
c5cd36
--- a/configure
c5cd36
+++ b/configure
5544c1
@@ -210,6 +210,7 @@ bsd_user="no"
bd56df
 guest_base=""
c5cd36
 uname_release=""
c5cd36
 mixemu="no"
c5cd36
+kvmoptions="yes"
c5cd36
 aix="no"
c5cd36
 blobs="yes"
c5cd36
 pkgversion=" ($(kvm_version))"
5544c1
@@ -732,6 +733,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"
5544c1
@@ -1080,6 +1083,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)"
bd56df
 echo "  --disable-nptl           disable usermode NPTL support"
bd56df
 echo "  --enable-nptl            enable usermode NPTL support"
5544c1
@@ -3160,6 +3165,7 @@ echo "ATTR/XATTR support $attr"
bd56df
 echo "Install blobs     $blobs"
c5cd36
 echo "KVM support       $kvm"
c5cd36
 echo "TCG interpreter   $tcg_interpreter"
c5cd36
+echo "KVM CLI options   $kvmoptions"
c5cd36
 echo "fdt support       $fdt"
c5cd36
 echo "preadv support    $preadv"
c5cd36
 echo "fdatasync         $fdatasync"
5544c1
@@ -3893,7 +3899,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
-- 
5544c1
1.7.12.1
c5cd36