From: Igor Druzhinin Date: Wed, 3 Feb 2021 20:07:04 +0000 (+0000) Subject: tools/libxl: only set viridian flags on new domains X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~926 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=25ee478662d378ec2b24f517fb6d8d4829b885ff;p=xen.git tools/libxl: only set viridian flags on new domains Domains migrating or restoring should have viridian HVM param key in the migration stream already and setting that twice results in Xen returing -EEXIST on the second attempt later (during migration stream parsing) in case the values don't match. That causes migration/restore operation to fail at destination side. That issue is now resurfaced by the latest commits (983524671 and 7e5cffcd1e) extending default viridian feature set making the values from the previous migration streams and those set at domain construction different. Suggested-by: Andrew Cooper Signed-off-by: Igor Druzhinin Reviewed-by: Andrew Cooper Release-Acked-by: Ian Jackson --- diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c index 91169d1045..58187ed760 100644 --- a/tools/libs/light/libxl_x86.c +++ b/tools/libs/light/libxl_x86.c @@ -468,7 +468,10 @@ int libxl__arch_domain_create(libxl__gc *gc, (ret = hvm_set_conf_params(gc, domid, info)) != 0) goto out; - if (info->type == LIBXL_DOMAIN_TYPE_HVM && + /* Viridian flags are already a part of the migration stream so set + * them here only for brand new domains. */ + if (!state->restore && + info->type == LIBXL_DOMAIN_TYPE_HVM && (ret = hvm_set_viridian_features(gc, domid, info)) != 0) goto out;