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