From: andres@lagarcavilla.com Subject: [PATCH] libxl: apply CPUID policy for all types of VMs in all situations Date: Tue, 5 Jan 2010 10:53:41 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20100105105341_69754" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ------=_20100105105341_69754 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Apply CPUID policy to all types of VMs in all situations. Otherwise PV VM= s 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 ------=_20100105105341_69754 Content-Type: text/x-patch; name="fix_cpuid_libxl.patch" Content-Disposition: attachment; filename="fix_cpuid_libxl.patch" Content-Transfer-Encoding: quoted-printable # HG changeset patch # User Andres Lagar-Cavilla # Date 1262716285 18000 # Node ID d04f0d58ba0c5d95f8da7b4757888786c6f112ce # Parent 4feec90815a0f8997638600bd0c53a5a5d87f3fe Apply CPUID policy to all types of VMs in all situations diff -r 4feec90815a0 -r d04f0d58ba0c tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Tue Jan 05 08:40:18 2010 +0000 +++ b/tools/libxl/libxl_dom.c Tue Jan 05 13:31:25 2010 -0500 @@ -93,6 +93,10 @@ int build_post(struct libxl_ctx *ctx, ui char **ents; int i; =20 +#if defined(__i386__) || defined(__x86_64__) + xc_cpuid_apply_policy(ctx->xch, domid); +#endif + ents =3D libxl_calloc(ctx, (10 + info->max_vcpus) * 2, sizeof(char *= )); ents[0] =3D "memory/static-max"; ents[1] =3D libxl_sprintf(ctx, "%d", info->max_memkb); @@ -177,9 +181,6 @@ int build_hvm(struct libxl_ctx *ctx, uin XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, ret, "hvm build set params fa= iled"); return ERROR_FAIL; } -#if defined(__i386__) || defined(__x86_64__) - xc_cpuid_apply_policy(ctx->xch, domid); -#endif return 0; } =20 @@ -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; } =20 ------=_20100105105341_69754 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_20100105105341_69754--