dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

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

bd56df
From 7b9b4ec74c7c0f63672d3aa627d7b153b71ba427 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
bd56df
index bf3acc8..cf2dc9f 100755
c5cd36
--- a/configure
c5cd36
+++ b/configure
bd56df
@@ -211,6 +211,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))"
bd56df
@@ -747,6 +748,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"
bd56df
@@ -1113,6 +1116,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"
bd56df
@@ -3156,6 +3161,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"
bd56df
@@ -3889,7 +3895,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