Commit a5615b14 authored by Orit Wasserman's avatar Orit Wasserman Committed by Juan Quintela

XBZRLE cache size should not be larger than guest memory size

Signed-off-by: default avatarOrit Wasserman <>
Reviewed-by: default avatarDr. David Alan Gilbert <>
Signed-off-by: default avatarJuan Quintela <>
parent 905f26f2
......@@ -479,6 +479,13 @@ void qmp_migrate_set_cache_size(int64_t value, Error **errp)
/* Cache should not be larger than guest ram size */
if (value > ram_bytes_total()) {
error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size",
"exceeds guest ram size ");
new_size = xbzrle_cache_resize(value);
if (new_size < 0) {
error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment