aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-01-06 08:25:07 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-01-06 08:25:07 +0000
commit378bb0ed7f379527542ff3c52b29dd7388f1e6c1 (patch)
tree7c7bda7a758cb6238dd16eb5c1a58483db3d997e
parentc65d37be54debe7d43d9fba62d2c146d95155fbb (diff)
downloadxen-378bb0ed7f379527542ff3c52b29dd7388f1e6c1.tar.gz
xen-378bb0ed7f379527542ff3c52b29dd7388f1e6c1.tar.bz2
xen-378bb0ed7f379527542ff3c52b29dd7388f1e6c1.zip
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 <andres@lagarcavilla.com>
-rw-r--r--tools/libxl/libxl_dom.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index ae93bd11ea..7196aa869e 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -93,6 +93,10 @@ int build_post(struct libxl_ctx *ctx, uint32_t domid,
char **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, uint32_t domid,
XL_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, uint32_t domid,
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;
}