[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/12] configure: add --disable-colo-proxy option
From: |
Juan Quintela |
Subject: |
[PULL 01/12] configure: add --disable-colo-proxy option |
Date: |
Thu, 18 May 2023 19:12:53 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Add option to not build filter-rewriter and colo-compare when
they are not needed.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230515130640.46035-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
stubs/colo-compare.c | 7 +++++++
meson_options.txt | 2 ++
net/meson.build | 13 ++++++++++---
scripts/meson-buildoptions.sh | 3 +++
stubs/meson.build | 1 +
5 files changed, 23 insertions(+), 3 deletions(-)
create mode 100644 stubs/colo-compare.c
diff --git a/stubs/colo-compare.c b/stubs/colo-compare.c
new file mode 100644
index 0000000000..ec726665be
--- /dev/null
+++ b/stubs/colo-compare.c
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "qemu/notify.h"
+#include "net/colo-compare.h"
+
+void colo_compare_cleanup(void)
+{
+}
diff --git a/meson_options.txt b/meson_options.txt
index 11aec2a441..d1b6738c1b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -293,6 +293,8 @@ option('live_block_migration', type: 'feature', value:
'auto',
description: 'block migration in the main migration stream')
option('replication', type: 'feature', value: 'auto',
description: 'replication support')
+option('colo_proxy', type: 'feature', value: 'auto',
+ description: 'colo-proxy support')
option('bochs', type: 'feature', value: 'auto',
description: 'bochs image format support')
option('cloop', type: 'feature', value: 'auto',
diff --git a/net/meson.build b/net/meson.build
index 87afca3e93..6f4ecde57f 100644
--- a/net/meson.build
+++ b/net/meson.build
@@ -1,13 +1,10 @@
softmmu_ss.add(files(
'announce.c',
'checksum.c',
- 'colo-compare.c',
- 'colo.c',
'dump.c',
'eth.c',
'filter-buffer.c',
'filter-mirror.c',
- 'filter-rewriter.c',
'filter.c',
'hub.c',
'net-hmp-cmds.c',
@@ -19,6 +16,16 @@ softmmu_ss.add(files(
'util.c',
))
+if get_option('replication').allowed() or \
+ get_option('colo_proxy').allowed()
+ softmmu_ss.add(files('colo-compare.c'))
+ softmmu_ss.add(files('colo.c'))
+endif
+
+if get_option('colo_proxy').allowed()
+ softmmu_ss.add(files('filter-rewriter.c'))
+endif
+
softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
if have_l2tpv3
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 52fb079a60..a66eb31dae 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -86,6 +86,7 @@ meson_options_help() {
printf "%s\n" ' capstone Whether and how to find the capstone
library'
printf "%s\n" ' cloop cloop image format support'
printf "%s\n" ' cocoa Cocoa user interface (macOS only)'
+ printf "%s\n" ' colo-proxy colo-proxy support'
printf "%s\n" ' coreaudio CoreAudio sound support'
printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver'
printf "%s\n" ' curl CURL block device driver'
@@ -245,6 +246,8 @@ _meson_option_parse() {
--disable-cloop) printf "%s" -Dcloop=disabled ;;
--enable-cocoa) printf "%s" -Dcocoa=enabled ;;
--disable-cocoa) printf "%s" -Dcocoa=disabled ;;
+ --enable-colo-proxy) printf "%s" -Dcolo_proxy=enabled ;;
+ --disable-colo-proxy) printf "%s" -Dcolo_proxy=disabled ;;
--enable-coreaudio) printf "%s" -Dcoreaudio=enabled ;;
--disable-coreaudio) printf "%s" -Dcoreaudio=disabled ;;
--enable-coroutine-pool) printf "%s" -Dcoroutine_pool=true ;;
diff --git a/stubs/meson.build b/stubs/meson.build
index 8412cad15f..a56645e2f7 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -46,6 +46,7 @@ stub_ss.add(files('target-monitor-defs.c'))
stub_ss.add(files('trace-control.c'))
stub_ss.add(files('uuid.c'))
stub_ss.add(files('colo.c'))
+stub_ss.add(files('colo-compare.c'))
stub_ss.add(files('vmstate.c'))
stub_ss.add(files('vm-stop.c'))
stub_ss.add(files('win32-kbd-hook.c'))
--
2.40.1
- [PULL 00/12] Migration 20230518 patches, Juan Quintela, 2023/05/18
- [PULL 01/12] configure: add --disable-colo-proxy option,
Juan Quintela <=
- [PULL 02/12] migration: split migration_incoming_co, Juan Quintela, 2023/05/18
- [PULL 03/12] migration: process_incoming_migration_co(): move colo part to colo, Juan Quintela, 2023/05/18
- [PULL 04/12] migration: Don't use INT64_MAX for unlimited rate, Juan Quintela, 2023/05/18
- [PULL 06/12] migration: Move rate_limit_max and rate_limit_used to migration_stats, Juan Quintela, 2023/05/18
- [PULL 05/12] qemu-file: Account for rate_limit usage on qemu_fflush(), Juan Quintela, 2023/05/18
- [PULL 07/12] migration: Move migration_total_bytes() to migration-stats.c, Juan Quintela, 2023/05/18
- [PULL 08/12] migration: Add a trace for migration_transferred_bytes, Juan Quintela, 2023/05/18
- [PULL 09/12] migration: Use migration_transferred_bytes() to calculate rate_limit, Juan Quintela, 2023/05/18