qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v3 02/27] migration: Introduce capability 'c


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC v3 02/27] migration: Introduce capability 'colo' to migration
Date: Mon, 16 Feb 2015 14:57:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/11/2015 08:16 PM, zhanghailiang wrote:
> This capability allows Primary VM (PVM) to be continuously checkpointed
> to secondary VM.
> 
> Signed-off-by: zhanghailiang <address@hidden>
> Signed-off-by: Yang Hongyang <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
> Signed-off-by: Lai Jiangshan <address@hidden>
> ---
>  include/migration/migration.h |  1 +
>  migration/migration.c         | 15 +++++++++++++++
>  qapi-schema.json              |  5 ++++-
>  3 files changed, 20 insertions(+), 1 deletion(-)
> 

> +++ b/migration/migration.c
> @@ -276,6 +276,15 @@ void 
> qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
>      }
>  
>      for (cap = params; cap; cap = cap->next) {
> +#ifndef CONFIG_COLO
> +        if (cap->value->capability == MIGRATION_CAPABILITY_COLO &&
> +            cap->value->state) {
> +            error_setg(errp, "COLO is not currently supported, please"
> +                             " configure with --enable-colo option in order 
> to"
> +                             " support COLO feature");
> +            continue;
> +        }
> +#endif
>          s->enabled_capabilities[cap->value->capability] = cap->value->state;
>      }

Yuck.  This means that probing whether colo is supported requires a
usage test (try setting the capability with migrate-set-capabilities and
see if it fails) instead of a query test (list the current capabilities;
if colo is in the set then it is supported).  Can you figure out a way
to avoid exposing the colo capability if !CONFIG_COLO, so that
query-migate-capabilities is sufficient to learn if colo is supported?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]