diff options
author | Andre Przywara <andre.przywara@amd.com> | 2010-09-16 18:02:40 +0100 |
---|---|---|
committer | Andre Przywara <andre.przywara@amd.com> | 2010-09-16 18:02:40 +0100 |
commit | d3c4df5c7e9a23e44da0ddd4ca1974543709bf05 (patch) | |
tree | bf3ab602dfee825106fbfa2b37b75b1fbc306ab7 /tools/libxl/libxl_dom.c | |
parent | 497515e5008f5c7a6279233b5f47afbb68f9c5cb (diff) | |
download | xen-d3c4df5c7e9a23e44da0ddd4ca1974543709bf05.tar.gz xen-d3c4df5c7e9a23e44da0ddd4ca1974543709bf05.tar.bz2 xen-d3c4df5c7e9a23e44da0ddd4ca1974543709bf05.zip |
libxl: introduce cpuid interface to domain build
Add a cpuid parameter into libxl_domain_build_info and use
it's content while setting up the domain. This is a only paving the way,
the real functionality is implemented in the later patches.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_dom.c')
-rw-r--r-- | tools/libxl/libxl_dom.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 5dafa1dfd1..9f5d98552f 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -95,9 +95,15 @@ int libxl__build_post(libxl_ctx *ctx, uint32_t domid, xs_transaction_t t; char **ents; int i; + char *cpuid_res[4]; #if defined(__i386__) || defined(__x86_64__) xc_cpuid_apply_policy(ctx->xch, domid); + if (info->cpuid != NULL) { + for (i = 0; info->cpuid[i].input[0] != XEN_CPUID_INPUT_UNUSED; i++) + xc_cpuid_set(ctx->xch, domid, info->cpuid[i].input, + (const char**)(info->cpuid[i].policy), cpuid_res); + } #endif ents = libxl__calloc(&gc, 12 + (info->max_vcpus * 2) + 2, sizeof(char *)); |