From: Juan Quintela Date: Thu, 19 Oct 2023 11:07:15 +0000 (+0200) Subject: migration: Give one error if trying to set COMPRESSION and XBZRLE X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0e195629969125e3a168a7e06e3c49d939c36ead;p=qemu.git migration: Give one error if trying to set COMPRESSION and XBZRLE Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-3-quintela@redhat.com> --- diff --git a/migration/options.c b/migration/options.c index b8c3c3218d..37fa1cfe74 100644 --- a/migration/options.c +++ b/migration/options.c @@ -625,6 +625,13 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp) } } + if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) { + if (new_caps[MIGRATION_CAPABILITY_XBZRLE]) { + error_setg(errp, "Compression is not compatible with xbzrle"); + return false; + } + } + return true; }