On 23/03/2021 09:58, Roger Pau Monne wrote: > @@ -462,8 +464,13 @@ void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, > bool restore, > itsc = (libxl_defbool_val(info->disable_migrate) || > info->tsc_mode == LIBXL_TSC_MODE_ALWAYS_EMULATE); > > - xc_cpuid_apply_policy(ctx->xch, domid, restore, NULL, 0, > - pae, itsc, nested_virt, info->cpuid); > + rc = xc_cpuid_apply_policy(ctx->xch, domid, restore, NULL, 0, > + pae, itsc, nested_virt, info->cpuid); > + if (rc) > + LOGE(ERROR, "Failed to apply CPUID policy");
If we are planning to take this patch, then you need to convert from xc errors (-errno) to libxl errors here, or the caller is going to receive gibberish. ~Andrew > + > + GC_FREE; > + return rc; > }