diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-10-30 11:17:02 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-10-30 11:17:02 +0000 |
| commit | 21dab18b53f37664c2046c5bba91b416705ccdf1 (patch) | |
| tree | 6b30f6eab40a5c0a61da70f973723771be8172b2 /hmp.c | |
| parent | ab752f237d755897735dc755182f60af39cbc5b6 (diff) | |
| parent | 56b4a42a2e0ae74cee629abcb82993e79deeb356 (diff) | |
| download | focaccia-qemu-21dab18b53f37664c2046c5bba91b416705ccdf1.tar.gz focaccia-qemu-21dab18b53f37664c2046c5bba91b416705ccdf1.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20171029' into staging
migration/next for 20171029 # gpg: Signature made Sun 29 Oct 2017 13:07:43 GMT # gpg: using RSA key 0xF487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/migration/20171029: tests: check that migration parameters are really assigned tests: Don't abuse global_qtest tests: Factorize out migrate_test_start/end tests: Refactor setting of parameters/capabilities tests: rename postcopy-test to migration-test migration: Make xbzrle_cache_size a migration parameter migration: No need to return the size of the cache migration: Don't play games with the requested cache size migration: Make sure that we pass the right cache size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hmp.c')
| -rw-r--r-- | hmp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c index 41fcce6f5a..a01be50daa 100644 --- a/hmp.c +++ b/hmp.c @@ -342,6 +342,9 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict) monitor_printf(mon, "%s: %" PRId64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUNT), params->x_multifd_page_count); + monitor_printf(mon, "%s: %" PRId64 "\n", + MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), + params->xbzrle_cache_size); } qapi_free_MigrationParameters(params); @@ -1578,6 +1581,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) Visitor *v = string_input_visitor_new(valuestr); MigrateSetParameters *p = g_new0(MigrateSetParameters, 1); uint64_t valuebw = 0; + uint64_t cache_size; Error *err = NULL; int val, ret; @@ -1653,6 +1657,16 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) p->has_x_multifd_page_count = true; visit_type_int(v, param, &p->x_multifd_page_count, &err); break; + case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE: + p->has_xbzrle_cache_size = true; + visit_type_size(v, param, &cache_size, &err); + if (err || cache_size > INT64_MAX + || (size_t)cache_size != cache_size) { + error_setg(&err, "Invalid size %s", valuestr); + break; + } + p->xbzrle_cache_size = cache_size; + break; default: assert(0); } |