From: Eric Chanudet <eric.chanudet@citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 4 of 4] xl: tsc_mode parameter in guest configuration file
Date: Thu, 01 Apr 2010 17:27:26 +0100 [thread overview]
Message-ID: <402de5100c28aa779b83.1270139246@eric.cam.xci-test.com> (raw)
In-Reply-To: <patchbomb.1270139242@eric.cam.xci-test.com>
This patch handle tsc_mode argument in guest configuration file.
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -74,6 +74,7 @@ typedef struct {
int vpt_align;
int max_vcpus;
int cur_vcpus;
+ int tsc_mode;
uint32_t max_memkb;
uint32_t target_memkb;
uint32_t video_memkb;
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -72,6 +72,7 @@ int build_pre(struct libxl_ctx *ctx, uin
xc_domain_set_memmap_limit(ctx->xch, domid,
(info->hvm) ? info->max_memkb :
(info->max_memkb + info->u.pv.slack_memkb));
+ xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0);
if (info->hvm) {
unsigned long shadow;
diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -235,6 +235,7 @@ static void printf_info(libxl_domain_cre
printf("hpet: %d\n", b_info->hpet);
printf("vpt_align: %d\n", b_info->vpt_align);
printf("max_vcpus: %d\n", b_info->max_vcpus);
+ printf("tsc_mode: %d\n", b_info->tsc_mode);
printf("max_memkb: %d\n", b_info->max_memkb);
printf("target_memkb: %d\n", b_info->target_memkb);
printf("kernel: %s\n", b_info->kernel);
@@ -382,6 +383,9 @@ static void parse_config_file(const char
b_info->target_memkb = b_info->max_memkb;
}
+ if (!xlu_cfg_get_long(config, "tsc_mode", &l))
+ b_info->tsc_mode = l;
+
if (!xlu_cfg_get_long (config, "shadow_memory", &l))
b_info->shadow_memkb = l * 1024;
prev parent reply other threads:[~2010-04-01 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 16:27 [PATCH 0 of 4] xl: vcpu commands and tsc_mode parameter Eric Chanudet
2010-04-01 16:27 ` [PATCH 1 of 4] xl: vcpu-list command Eric Chanudet
2010-04-01 16:27 ` [PATCH 2 of 4] xl: vcpu-pin command Eric Chanudet
2010-04-01 16:27 ` [PATCH 3 of 4] xl: vcpu-set command Eric Chanudet
2010-04-01 16:27 ` Eric Chanudet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=402de5100c28aa779b83.1270139246@eric.cam.xci-test.com \
--to=eric.chanudet@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).