aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-12-14 22:42:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-14 22:42:14 +0000
commitae2b87341b5ddb0dcb1b3f2d4f586ef18de75873 (patch)
tree3af0e07d7aca1a635cdd13966ce5688e5ec79585 /migration
parent5204b499a6cae4dfd9fe762d5e6e82224892383b (diff)
parent5efb40d6571457c3cc35b7a91088cc2fceee5763 (diff)
Merge tag 'pull-qapi-2022-12-14-v2' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2022-12-14 # gpg: Signature made Wed 14 Dec 2022 19:14:34 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-qapi-2022-12-14-v2' of https://repo.or.cz/qemu/armbru: (30 commits) qapi: Drop temporary logic to support conversion step by step qapi qga: Elide redundant has_FOO in generated C qapi virtio: Elide redundant has_FOO in generated C qapi ui: Elide redundant has_FOO in generated C qapi transaction: Elide redundant has_FOO in generated C qapi tpm: Elide redundant has_FOO in generated C qapi stats: Elide redundant has_FOO in generated C qapi run-state: Elide redundant has_FOO in generated C qapi rocker: Elide redundant has_FOO in generated C qapi replay: Elide redundant has_FOO in generated C qapi qdev qom: Elide redundant has_FOO in generated C qapi pci: Elide redundant has_FOO in generated C qapi net: Elide redundant has_FOO in generated C qapi misc: Elide redundant has_FOO in generated C qapi migration: Elide redundant has_FOO in generated C qapi machine: Elide redundant has_FOO in generated C qapi job: Elide redundant has_FOO in generated C qapi dump: Elide redundant has_FOO in generated C qapi crypto: Elide redundant has_FOO in generated C qapi chardev: Elide redundant has_FOO in generated C ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration')
-rw-r--r--migration/block-dirty-bitmap.c4
-rw-r--r--migration/colo.c1
-rw-r--r--migration/migration.c27
3 files changed, 10 insertions, 22 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index 9aba7d9c22..283017d7d3 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -551,7 +551,7 @@ static int add_bitmaps_to_list(DBMSaveState *s, BlockDriverState *bs,
}
bitmap_alias = bmap_inner->alias;
- if (bmap_inner->has_transform) {
+ if (bmap_inner->transform) {
bitmap_transform = bmap_inner->transform;
}
} else {
@@ -821,7 +821,7 @@ static int dirty_bitmap_load_start(QEMUFile *f, DBMLoadState *s)
}
if (s->bmap_inner &&
- s->bmap_inner->has_transform &&
+ s->bmap_inner->transform &&
s->bmap_inner->transform->has_persistent) {
persistent = s->bmap_inner->transform->persistent;
} else {
diff --git a/migration/colo.c b/migration/colo.c
index 2b71722fd6..232c8d44b1 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -250,7 +250,6 @@ ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
replication_get_error_all(&err);
if (err) {
s->error = true;
- s->has_desc = true;
s->desc = g_strdup(error_get_pretty(err));
} else {
s->error = false;
diff --git a/migration/migration.c b/migration/migration.c
index f485eea5fb..78a0b010d4 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -918,11 +918,8 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp)
params->cpu_throttle_increment = s->parameters.cpu_throttle_increment;
params->has_cpu_throttle_tailslow = true;
params->cpu_throttle_tailslow = s->parameters.cpu_throttle_tailslow;
- params->has_tls_creds = true;
params->tls_creds = g_strdup(s->parameters.tls_creds);
- params->has_tls_hostname = true;
params->tls_hostname = g_strdup(s->parameters.tls_hostname);
- params->has_tls_authz = true;
params->tls_authz = g_strdup(s->parameters.tls_authz ?
s->parameters.tls_authz : "");
params->has_max_bandwidth = true;
@@ -1047,7 +1044,6 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
{
size_t page_size = qemu_target_page_size();
- info->has_ram = true;
info->ram = g_malloc0(sizeof(*info->ram));
info->ram->transferred = ram_counters.transferred;
info->ram->total = ram_bytes_total();
@@ -1069,7 +1065,6 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
info->ram->postcopy_bytes = ram_counters.postcopy_bytes;
if (migrate_use_xbzrle()) {
- info->has_xbzrle_cache = true;
info->xbzrle_cache = g_malloc0(sizeof(*info->xbzrle_cache));
info->xbzrle_cache->cache_size = migrate_xbzrle_cache_size();
info->xbzrle_cache->bytes = xbzrle_counters.bytes;
@@ -1081,7 +1076,6 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
}
if (migrate_use_compression()) {
- info->has_compression = true;
info->compression = g_malloc0(sizeof(*info->compression));
info->compression->pages = compression_counters.pages;
info->compression->busy = compression_counters.busy;
@@ -1106,7 +1100,6 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
static void populate_disk_info(MigrationInfo *info)
{
if (blk_mig_active()) {
- info->has_disk = true;
info->disk = g_malloc0(sizeof(*info->disk));
info->disk->transferred = blk_mig_bytes_transferred();
info->disk->remaining = blk_mig_bytes_remaining();
@@ -1171,7 +1164,6 @@ static void fill_source_migration_info(MigrationInfo *info)
case MIGRATION_STATUS_FAILED:
info->has_status = true;
if (s->error) {
- info->has_error_desc = true;
info->error_desc = g_strdup(error_get_pretty(s->error));
}
break;
@@ -1575,7 +1567,7 @@ static bool migrate_params_check(MigrationParameters *params, Error **errp)
#ifdef CONFIG_LINUX
if (migrate_use_zero_copy_send() &&
((params->has_multifd_compression && params->multifd_compression) ||
- (params->has_tls_creds && params->tls_creds && *params->tls_creds))) {
+ (params->tls_creds && *params->tls_creds))) {
error_setg(errp,
"Zero copy only available for non-compressed non-TLS multifd migration");
return false;
@@ -1624,12 +1616,12 @@ static void migrate_params_test_apply(MigrateSetParameters *params,
dest->cpu_throttle_tailslow = params->cpu_throttle_tailslow;
}
- if (params->has_tls_creds) {
+ if (params->tls_creds) {
assert(params->tls_creds->type == QTYPE_QSTRING);
dest->tls_creds = params->tls_creds->u.s;
}
- if (params->has_tls_hostname) {
+ if (params->tls_hostname) {
assert(params->tls_hostname->type == QTYPE_QSTRING);
dest->tls_hostname = params->tls_hostname->u.s;
}
@@ -1721,19 +1713,19 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
s->parameters.cpu_throttle_tailslow = params->cpu_throttle_tailslow;
}
- if (params->has_tls_creds) {
+ if (params->tls_creds) {
g_free(s->parameters.tls_creds);
assert(params->tls_creds->type == QTYPE_QSTRING);
s->parameters.tls_creds = g_strdup(params->tls_creds->u.s);
}
- if (params->has_tls_hostname) {
+ if (params->tls_hostname) {
g_free(s->parameters.tls_hostname);
assert(params->tls_hostname->type == QTYPE_QSTRING);
s->parameters.tls_hostname = g_strdup(params->tls_hostname->u.s);
}
- if (params->has_tls_authz) {
+ if (params->tls_authz) {
g_free(s->parameters.tls_authz);
assert(params->tls_authz->type == QTYPE_QSTRING);
s->parameters.tls_authz = g_strdup(params->tls_authz->u.s);
@@ -1810,14 +1802,14 @@ void qmp_migrate_set_parameters(MigrateSetParameters *params, Error **errp)
MigrationParameters tmp;
/* TODO Rewrite "" to null instead */
- if (params->has_tls_creds
+ if (params->tls_creds
&& params->tls_creds->type == QTYPE_QNULL) {
qobject_unref(params->tls_creds->u.n);
params->tls_creds->type = QTYPE_QSTRING;
params->tls_creds->u.s = strdup("");
}
/* TODO Rewrite "" to null instead */
- if (params->has_tls_hostname
+ if (params->tls_hostname
&& params->tls_hostname->type == QTYPE_QNULL) {
qobject_unref(params->tls_hostname->u.n);
params->tls_hostname->type = QTYPE_QSTRING;
@@ -4492,9 +4484,6 @@ static void migration_instance_init(Object *obj)
params->has_announce_max = true;
params->has_announce_rounds = true;
params->has_announce_step = true;
- params->has_tls_creds = true;
- params->has_tls_hostname = true;
- params->has_tls_authz = true;
qemu_sem_init(&ms->postcopy_pause_sem, 0);
qemu_sem_init(&ms->postcopy_pause_rp_sem, 0);