Merge tag 'migration-20260330-pull-request' of https://gitlab.com/farosas/qemu into staging

Migration pull request

- Fix dirty limit (-m thorough) test
- Fix a few error message strings

# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmnKx94QHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnXp7EADLdY2S5gVgc8/R/b0uZRzj9f0A9vrkK2S8
# bcUHJxhY+PkJhUnNRr2l4PuyiwLCKefDWc0gnl9J0mFZ/gqVnkAPEZhVS+hOwjZm
# 6KyHWwEz9hBqU0RmIq/RmVsvKw+jRqAIZ2k43N4aOy38TbRK1o5PLrK8T4Zouycq
# grsg383xahcHUx/RZDGilGXWONeOnnv/Tg8v6rqL51eGa8BllOTZRxqMlXD/r53/
# EyLAdr3gmeawL9o7aLU6bodRwRREWGAPyvHMKB6VBautu28MsMmPjpdAbP+i3aYY
# JoKreKxO1mXvV8UL8xYOTVLbR52qACQ35Q+YKplrT4vO8yqVhN+nr8XVeQmQi2gF
# elLWi//ir6ZQggArkGSIfLdkzsyuLtNlHLtT7i35xudWUx1KcEDuT3i18OY6Qfd+
# faJr9JZPQ0I0QWMo7qRDjfUSzgYYOYoAdrfuG5xND+z2X3W4BK4E8dL4uJ5Eipad
# 8q/yRZf2KbY2vzR/VDRVUXOyVcirV0bg0v3Y7iAdaffIyia/htFvtJoZHNMhKhzU
# zoqa6VtipHJT5YLstei2Nzol9u0ghh7snWmzUKFnPjlbOfP8L11r7hNd6iYW0lFY
# GegIgZWyqwhccIAzAndqS14bwN/yRiDcH1FiZH8wYJaT4gcaTtgRzI5JGA08Ahhc
# SVKJrpsq7A==
# =ynIi
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 19:58:38 2026 BST
# gpg:                using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg:                issuer "farosas@suse.de"
# gpg: Good signature from "Fabiano Rosas <farosas@suse.de>" [unknown]
# gpg:                 aka "Fabiano Almeida Rosas <fabiano.rosas@suse.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3  64CF C798 DC74 1BEC 319D

* tag 'migration-20260330-pull-request' of https://gitlab.com/farosas/qemu:
  tests/qtest/migration: Fix slow test dirty_limit
  migration: Fix references to parameter names in error messages
  migration: Fix up error message for max-cpu-throttle

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2026-03-31 09:39:52 +01:00
2 changed files with 20 additions and 20 deletions

View File

@@ -1133,103 +1133,103 @@ bool migrate_params_check(MigrationParameters *params, Error **errp)
if (params->throttle_trigger_threshold < 1 ||
params->throttle_trigger_threshold > 100) {
error_setg(errp, "Option throttle_trigger_threshold expects "
error_setg(errp, "Option throttle-trigger-threshold expects "
"an integer in the range of 1 to 100");
return false;
}
if (params->cpu_throttle_initial < 1 ||
params->cpu_throttle_initial > 99) {
error_setg(errp, "Option cpu_throttle_initial expects "
error_setg(errp, "Option cpu-throttle-initial expects "
"an integer in the range of 1 to 99");
return false;
}
if (params->cpu_throttle_increment < 1 ||
params->cpu_throttle_increment > 99) {
error_setg(errp, "Option cpu_throttle_increment expects "
error_setg(errp, "Option cpu-throttle-increment expects "
"an integer in the range of 1 to 99");
return false;
}
if (params->max_bandwidth > SIZE_MAX) {
error_setg(errp, "Option max_bandwidth expects "
error_setg(errp, "Option max-bandwidth expects "
"an integer in the range of 0 to "stringify(SIZE_MAX)
" bytes/second");
return false;
}
if (params->avail_switchover_bandwidth > SIZE_MAX) {
error_setg(errp, "Option avail_switchover_bandwidth expects "
error_setg(errp, "Option avail-switchover-bandwidth expects "
"an integer in the range of 0 to "stringify(SIZE_MAX)
" bytes/second");
return false;
}
if (params->downtime_limit > MAX_MIGRATE_DOWNTIME) {
error_setg(errp, "Option downtime_limit expects "
error_setg(errp, "Option downtime-limit expects "
"an integer in the range of 0 to "
stringify(MAX_MIGRATE_DOWNTIME)" ms");
return false;
}
if (params->multifd_channels < 1) {
error_setg(errp, "Option multifd_channels expects "
error_setg(errp, "Option multifd-channels expects "
"a value between 1 and 255");
return false;
}
if (params->multifd_zlib_level > 9) {
error_setg(errp, "Option multifd_zlib_level expects "
error_setg(errp, "Option multifd-zlib-level expects "
"a value between 0 and 9");
return false;
}
if (params->multifd_qatzip_level > 9 ||
params->multifd_qatzip_level < 1) {
error_setg(errp, "Option multifd_qatzip_level expects "
error_setg(errp, "Option multifd-qatzip-level expects "
"a value between 1 and 9");
return false;
}
if (params->multifd_zstd_level > 20) {
error_setg(errp, "Option multifd_zstd_level expects "
error_setg(errp, "Option multifd-zstd-level expects "
"a value between 0 and 20");
return false;
}
if (params->xbzrle_cache_size < qemu_target_page_size() ||
!is_power_of_2(params->xbzrle_cache_size)) {
error_setg(errp, "Option xbzrle_cache_size expects "
error_setg(errp, "Option xbzrle-cache-size expects "
"a power of two no less than the target page size");
return false;
}
if (params->max_cpu_throttle < params->cpu_throttle_initial ||
params->max_cpu_throttle > 99) {
error_setg(errp, "max_Option cpu_throttle expects "
"an integer in the range of cpu_throttle_initial to 99");
error_setg(errp, "Option max-cpu-throttle expects "
"an integer in the range of cpu-throttle-initial to 99");
return false;
}
if (params->announce_initial > 100000) {
error_setg(errp, "Option announce_initial expects "
error_setg(errp, "Option announce-initial expects "
"a value between 0 and 100000");
return false;
}
if (params->announce_max > 100000) {
error_setg(errp, "Option announce_max expects "
error_setg(errp, "Option announce-max expects "
"a value between 0 and 100000");
return false;
}
if (params->announce_rounds > 1000) {
error_setg(errp, "Option announce_rounds expects "
error_setg(errp, "Option announce-rounds expects "
"a value between 0 and 1000");
return false;
}
if (params->announce_step < 1 ||
params->announce_step > 10000) {
error_setg(errp, "Option announce_step expects "
error_setg(errp, "Option announce-step expects "
"a value between 0 and 10000");
return false;
}
@@ -1264,7 +1264,7 @@ bool migrate_params_check(MigrationParameters *params, Error **errp)
if (params->vcpu_dirty_limit < 1) {
error_setg(errp,
"Parameter 'vcpu_dirty_limit' must be greater than 1 MB/s");
"Parameter 'vcpu-dirty-limit' must be greater than 1 MB/s");
return false;
}

View File

@@ -1070,11 +1070,10 @@ static void test_dirty_limit(char *name, MigrateCommon *args)
args->start.hide_stderr = true;
args->start.use_dirty_ring = true;
args->listen_uri = uri;
args->connect_uri = uri;
/* Start src, dst vm */
if (migrate_start(&from, &to, args->listen_uri, &args->start)) {
if (migrate_start(&from, &to, "defer", &args->start)) {
return;
}
@@ -1082,6 +1081,7 @@ static void test_dirty_limit(char *name, MigrateCommon *args)
migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_value);
/* Start migrate */
migrate_incoming_qmp(to, args->connect_uri, NULL, "{}");
migrate_qmp(from, to, args->connect_uri, NULL, "{}");
/* Wait for dirty limit throttle begin */