Blame SOURCES/kvm-redhat-add-CONFIG_RHV-flag.patch

4a2fec
From 4506913c42c58ef5a667779596af1c4bd1b11102 Mon Sep 17 00:00:00 2001
4a2fec
From: Laurent Vivier <lvivier@redhat.com>
4a2fec
Date: Fri, 6 Oct 2017 16:04:07 +0200
4a2fec
Subject: [PATCH 04/69] redhat: add CONFIG_RHV flag
4a2fec
4a2fec
RH-Author: Laurent Vivier <lvivier@redhat.com>
4a2fec
Message-id: <20171006160407.18609-1-lvivier@redhat.com>
4a2fec
Patchwork-id: 76906
4a2fec
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH v3] redhat: add CONFIG_RHV flag
4a2fec
Bugzilla: 1498865
4a2fec
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
RH-Acked-by: Thomas Huth <thuth@redhat.com>
4a2fec
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
4a2fec
4a2fec
We need to know if the binaries we build are for qemu-kvm-rhev
4a2fec
or qemu-kvm-ma.
4a2fec
4a2fec
Add an option to configure to select the target:
4a2fec
--rhel-target=rhv for qemu-kvm-rhev or
4a2fec
--rhel-target=rhel for qemu-kvm-ma.
4a2fec
4a2fec
If RHEL target is rhv, the CONFIG_RHV macro is defined.
4a2fec
By default, configure selects "rhv" target.
4a2fec
4a2fec
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 configure                     | 9 +++++++++
4a2fec
 redhat/Makefile               | 2 +-
4a2fec
 redhat/Makefile.local         | 1 +
4a2fec
 redhat/build_configure.sh     | 9 +++++++++
4a2fec
 redhat/qemu-kvm.spec.template | 5 +++++
4a2fec
 5 files changed, 25 insertions(+), 1 deletion(-)
4a2fec
4a2fec
diff --git a/configure b/configure
4a2fec
index 457b2ff..0da6821 100755
4a2fec
--- a/configure
4a2fec
+++ b/configure
4a2fec
@@ -407,6 +407,7 @@ jemalloc="no"
4a2fec
 replication="yes"
4a2fec
 vxhs=""
4a2fec
 vtd="yes"
4a2fec
+rhel_target="rhv"
4a2fec
 
4a2fec
 supported_cpu="no"
4a2fec
 supported_os="no"
4a2fec
@@ -1301,6 +1302,8 @@ for opt do
4a2fec
   ;;
4a2fec
   --enable-vtd) vtd="yes"
4a2fec
   ;;
4a2fec
+  --rhel-target=*) rhel_target="$optarg"
4a2fec
+  ;;
4a2fec
   *)
4a2fec
       echo "ERROR: unknown option $opt"
4a2fec
       echo "Try '$0 --help' for more information"
4a2fec
@@ -1469,6 +1472,7 @@ Advanced options (experts only):
4a2fec
                            xen pv domain builder
4a2fec
   --enable-debug-stack-usage
4a2fec
                            track the maximum stack usage of stacks created by qemu_alloc_stack
4a2fec
+  --rhel-target            set RHEL target (rhv or rhel)
4a2fec
 
4a2fec
 Optional features, enabled with --enable-FEATURE and
4a2fec
 disabled with --disable-FEATURE, default is enabled if available:
4a2fec
@@ -5395,6 +5399,7 @@ echo "avx2 optimization $avx2_opt"
4a2fec
 echo "replication support $replication"
4a2fec
 echo "VxHS block device $vxhs"
4a2fec
 echo "VT-d emulation    $vtd"
4a2fec
+echo "RHEL target       $rhel_target"
4a2fec
 
4a2fec
 if test "$sdl_too_old" = "yes"; then
4a2fec
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
4a2fec
@@ -6064,6 +6069,10 @@ if test "$vtd" = "yes" ; then
4a2fec
   echo "CONFIG_VTD=y" >> $config_host_mak
4a2fec
 fi
4a2fec
 
4a2fec
+if test "$rhel_target" = "rhv" ; then
4a2fec
+  echo "CONFIG_RHV=y" >> $config_host_mak
4a2fec
+fi
4a2fec
+
4a2fec
 if test "$tcg_interpreter" = "yes"; then
4a2fec
   QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
4a2fec
 elif test "$ARCH" = "sparc64" ; then
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec