> -----Original Message-----
> From: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
> Sent: Saturday, April 29, 2023 3:49 AM
> To: qemu-devel@nongnu.org
> Cc: lukasstra...@web.de; quint...@redhat.com; Zhang, Chen
> <chen.zh...@intel.com>; vsement...@yandex-team.ru; Peter Xu
> <pet...@redhat.com>; Leonardo Bras <leob...@redhat.com>
> Subject: [PATCH v4 10/10] 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 <vsement...@yandex-team.ru>
>

Reviewed-by: Zhang Chen <chen.zh...@intel.com>

Thanks
Chen

 ---
>  migration/migration.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/migration/migration.c b/migration/migration.c index
> 8c5bbf3e94..5e162c0622 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -395,6 +395,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;
> --
> 2.34.1


Reply via email to