mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
migration: block incoming colo when capability is disabled
We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Message-Id: <20230428194928.1426370-11-vsementsov@yandex-team.ru> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
d70178a88f
commit
121ccedc2b
2 changed files with 7 additions and 0 deletions
|
@ -398,6 +398,12 @@ int migration_incoming_enable_colo(void)
|
|||
return -ENOTSUP;
|
||||
#endif
|
||||
|
||||
if (!migrate_colo()) {
|
||||
error_report("ENABLE_COLO command come in migration stream, but c-colo "
|
||||
"capability is not set");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ram_block_discard_disable(true)) {
|
||||
error_report("COLO: cannot disable RAM discard");
|
||||
return -EBUSY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue