mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
migration: Make xbzrle_cache_size a migration parameter
Right now it is a variable in MigrationState instead of a MigrationParameter. The change allows to set it as the rest of the Migration parameters, from the command line, with query_migration_paramters, set_migrate_parameters, etc. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
c9dede2d48
commit
73af8dd8d7
5 changed files with 69 additions and 22 deletions
|
@ -129,13 +129,6 @@ int xbzrle_cache_resize(int64_t new_size, Error **errp)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Cache should not be larger than guest ram size */
|
||||
if (new_size > ram_bytes_total()) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "cache size",
|
||||
"exceeds guest ram size");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (new_size == migrate_xbzrle_cache_size()) {
|
||||
/* nothing to do */
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue