aboutsummaryrefslogtreecommitdiff
path: root/migration/options.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-02 10:41:23 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-27 10:18:25 +0200
commit10d4703be5d884bbbb6ecafe0e8bb270ad6ea937 (patch)
tree8e9b5babbdef1d8e0ed82df715261b89645c384c /migration/options.c
parent66f8b5a5ad17790e0039b39bf2b342fcb340b4ab (diff)
downloadqemu-10d4703be5d884bbbb6ecafe0e8bb270ad6ea937.zip
qemu-10d4703be5d884bbbb6ecafe0e8bb270ad6ea937.tar.gz
qemu-10d4703be5d884bbbb6ecafe0e8bb270ad6ea937.tar.bz2
migration: Move migrate_use_tls() to options.c
Once there, rename it to migrate_tls() and make it return bool for consistency. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> --- Fix typos found by fabiano
Diffstat (limited to 'migration/options.c')
-rw-r--r--migration/options.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/migration/options.c b/migration/options.c
index dd97c99..943936a 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -214,6 +214,15 @@ bool migrate_postcopy(void)
return migrate_postcopy_ram() || migrate_dirty_bitmaps();
}
+bool migrate_tls(void)
+{
+ MigrationState *s;
+
+ s = migrate_get_current();
+
+ return s->parameters.tls_creds && *s->parameters.tls_creds;
+}
+
typedef enum WriteTrackingSupport {
WT_SUPPORT_UNKNOWN = 0,
WT_SUPPORT_ABSENT,
@@ -368,7 +377,7 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
new_caps[MIGRATION_CAPABILITY_COMPRESS] ||
new_caps[MIGRATION_CAPABILITY_XBZRLE] ||
migrate_multifd_compression() ||
- migrate_use_tls())) {
+ migrate_tls())) {
error_setg(errp,
"Zero copy only available for non-compressed non-TLS multifd migration");
return false;