libxl: apply CPUID policy for all types of VMs in all situations
PATCH 1/1 libxl: apply CPUID policy for all types of VMs in all situations
Apply CPUID policy to all types of VMs in all situations. Otherwise PV VMs get no cpuid flags. It would be interesting if someone tested libxl on PV before pushing dozens of patches.
Signed-off-by Andres Lagar-Cavilla <[email protected]>
# HG changeset patch
# User Andres Lagar-Cavilla <[email protected]> # Date 1262716285 18000
# Node ID d04f0d58ba0c5d95f8da7b4757888786c6f112ce # Parent 4feec90815a0f8997638600bd0c53a5a5d87f3fe Apply CPUID policy to all types of VMs in all situations
tools/libxl/libxl_dom.c +4 -6
@@ -93,6 +93,10 @@ int build_post(struct libxl_ctx *ctx, uichar **ents;int i; +#if defined(__i386__) || defined(__x86_64__) +xc_cpuid_apply_policy (ctx->xch, domid); +#endif + ents =libxl_calloc (ctx, (10 + info->max_vcpus) *2 ,sizeof (char *)); ents[0 ] ="memory/static-max" ; ents[1 ] =libxl_sprintf (ctx,"%d" , info->max_memkb);
@@ -177,9 +181,6 @@ int build_hvm(struct libxl_ctx *ctx, uinXL_LOG_ERRNOVAL (ctx,XL_LOG_ERROR , ret,"hvm build set params failed" );return ERROR_FAIL ; } -#if defined(__i386__) || defined(__x86_64__) -xc_cpuid_apply_policy (ctx->xch, domid); -#endif return 0 ; }
@@ -192,9 +193,6 @@ int restore_common(struct libxl_ctx *ctx state->store_port, &state->store_mfn, state->console_port, &state->console_mfn, info->hvm, info->u.hvm.pae, 0); -#if defined(__i386__) || defined(__x86_64__) -xc_cpuid_apply_policy (ctx->xch, domid); -#endif return 0 ; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel