From: "you.chen" <you.chen@intel.com>
To: qemu-devel@nongnu.org
Cc: "you.chen" <you.chen@intel.com>,
"dennis . wu" <dennis.wu@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 1/2] migration: add build option to support qemu build with qatzip
Date: Mon, 17 Apr 2023 16:39:34 +0800 [thread overview]
Message-ID: <20230417083935.415782-2-you.chen@intel.com> (raw)
In-Reply-To: <20230417083935.415782-1-you.chen@intel.com>
In this patch, we added qatzip build option in the meson_options.txt and meson-buildoptons.sh to support qemu build with qatzip.
If you installed qatzip and would like to use it for live migration, you could use "--enable-qatzip" during configure, it will check qatzip availablility from the pkg-config list (Please make sure you correctly set PKG_CONFIG_PATH to include qatzip.pc).
If you simply use "configure" or use "configure --disable-qatzip", qatzip will not be enabled.
Co-developed-by: dennis.wu <dennis.wu@intel.com>
Signed-off-by: you.chen <you.chen@intel.com>
---
meson.build | 11 ++++++++++-
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 29f8644d6d..aa7445e29e 100644
--- a/meson.build
+++ b/meson.build
@@ -553,6 +553,13 @@ if have_system or have_tools
endif
zlib = dependency('zlib', required: true, kwargs: static_kwargs)
+qatzip = not_found
+if not get_option('qatzip').auto()
+ qatzip = dependency('qatzip', required: get_option('qatzip'),
+ method: 'pkg-config',
+ static: enable_static)
+endif
+
libaio = not_found
if not get_option('linux_aio').auto() or have_block
libaio = cc.find_library('aio', has_headers: ['libaio.h'],
@@ -1863,6 +1870,7 @@ config_host_data.set('CONFIG_LIBISCSI', libiscsi.found())
config_host_data.set('CONFIG_LIBNFS', libnfs.found())
config_host_data.set('CONFIG_LIBSSH', libssh.found())
config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
+config_host_data.set('CONFIG_QATZIP', qatzip.found())
config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
config_host_data.set('CONFIG_NUMA', numa.found())
@@ -3339,7 +3347,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
name_suffix: 'fa',
build_by_default: false)
migration = declare_dependency(link_with: libmigration,
- dependencies: [zlib, qom, io])
+ dependencies: [qatzip, zlib, qom, io])
softmmu_ss.add(migration)
block_ss = block_ss.apply(config_host, strict: false)
@@ -3986,6 +3994,7 @@ summary_info += {'vde support': vde}
summary_info += {'netmap support': have_netmap}
summary_info += {'l2tpv3 support': have_l2tpv3}
summary_info += {'Linux AIO support': libaio}
+summary_info += {'qatzip compress support': qatzip}
summary_info += {'Linux io_uring support': linux_io_uring}
summary_info += {'ATTR/XATTR support': libattr}
summary_info += {'RDMA support': rdma}
diff --git a/meson_options.txt b/meson_options.txt
index fc9447d267..ef6d639876 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -191,6 +191,8 @@ option('smartcard', type : 'feature', value : 'auto',
description: 'CA smartcard emulation support')
option('snappy', type : 'feature', value : 'auto',
description: 'snappy compression support')
+option('qatzip', type : 'feature', value : 'auto',
+ description: 'qatzip compress support')
option('spice', type : 'feature', value : 'auto',
description: 'Spice server support')
option('spice_protocol', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 009fab1515..84d110197d 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -152,6 +152,7 @@ meson_options_help() {
printf "%s\n" ' slirp-smbd use smbd (at path --smbd=*) in slirp networking'
printf "%s\n" ' smartcard CA smartcard emulation support'
printf "%s\n" ' snappy snappy compression support'
+ printf "%s\n" ' qatzip qatzip compression support'
printf "%s\n" ' sndio sndio sound support'
printf "%s\n" ' sparse sparse checker'
printf "%s\n" ' spice Spice server support'
@@ -332,6 +333,8 @@ _meson_option_parse() {
--disable-libvduse) printf "%s" -Dlibvduse=disabled ;;
--enable-linux-aio) printf "%s" -Dlinux_aio=enabled ;;
--disable-linux-aio) printf "%s" -Dlinux_aio=disabled ;;
+ --enable-qatzip) printf "%s" -Dqatzip=enabled ;;
+ --disable-qatzip) printf "%s" -Dqatzip=disabled ;;
--enable-linux-io-uring) printf "%s" -Dlinux_io_uring=enabled ;;
--disable-linux-io-uring) printf "%s" -Dlinux_io_uring=disabled ;;
--enable-live-block-migration) printf "%s" -Dlive_block_migration=enabled ;;
--
2.27.0
next prev parent reply other threads:[~2023-04-17 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 8:39 [PATCH v2 0/2] migration: use qatzip to acclerate the live migration you.chen
2023-04-17 8:39 ` you.chen [this message]
2023-04-17 9:04 ` [PATCH v2 1/2] migration: add build option to support qemu build with qatzip Thomas Huth
2023-04-17 8:39 ` [PATCH v2 2/2] migration: add support for qatzip compression when doing live migration you.chen
2023-04-17 13:27 ` Markus Armbruster
2023-04-20 11:29 ` Juan Quintela
2023-04-18 7:49 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417083935.415782-2-you.chen@intel.com \
--to=you.chen@intel.com \
--cc=berrange@redhat.com \
--cc=dennis.wu@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.