From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Eric Chanudet <eric.chanudet@citrix.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: RE: [PATCH] xl: tsc_mode parameter in guest configuration file
Date: Mon, 29 Mar 2010 07:11:25 -0700 (PDT) [thread overview]
Message-ID: <446767b3-2fdf-493f-9947-b5c57d70d556@default> (raw)
In-Reply-To: <h2v5d81b2881003290535g7edc14f8g4e1a17294b3fb209@mail.gmail.com>
Hi Eric --
Sorry I don't know my way around xl source, so just checking:
The tsc_mode parameter is important for both HVM and PV.
Looking through the patch, I see a lot of hvm changes.
Does the patch also handle PV tsc_mode?
Thanks,
Dan
> -----Original Message-----
> From: Eric Chanudet [mailto:eric.chanudet@citrix.com]
> Sent: Monday, March 29, 2010 6:35 AM
> To: xen-devel
> Subject: [Xen-devel] [PATCH] xl: tsc_mode parameter in guest
> configuration file
>
> 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
> @@ -176,7 +176,7 @@ int build_hvm(struct libxl_ctx *ctx, uin
> ret = hvm_build_set_params(ctx->xch, domid, info->u.hvm.apic,
> info->u.hvm.acpi,
> info->u.hvm.pae, info->u.hvm.nx,
> info->u.hvm.viridian,
> info->max_vcpus,
> - state->store_port, &state->store_mfn);
> + state->store_port, &state->store_mfn,
> info->tsc_mode);
> if (ret) {
> XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, ret, "hvm build set params
> failed");
> return ERROR_FAIL;
> diff --git a/tools/libxl/libxl_internal.h
> b/tools/libxl/libxl_internal.h
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -158,7 +158,7 @@ int libxl_device_pci_flr(struct libxl_ct
> /* from xenguest (helper */
> int hvm_build_set_params(int handle, uint32_t domid,
> int apic, int acpi, int pae, int nx, int
> viridian,
> - int vcpus, int store_evtchn, unsigned long
> *store_mfn);
> + int vcpus, int store_evtchn, unsigned long
> *store_mfn, int tsc_mode);
>
> /* xl_exec */
>
> diff --git a/tools/libxl/xenguest.c b/tools/libxl/xenguest.c
> --- a/tools/libxl/xenguest.c
> +++ b/tools/libxl/xenguest.c
> @@ -20,7 +20,7 @@
>
> int hvm_build_set_params(int handle, uint32_t domid,
> int apic, int acpi, int pae, int nx, int
> viridian,
> - int vcpus, int store_evtchn, unsigned long
> *store_mfn)
> + int vcpus, int store_evtchn, unsigned long
> *store_mfn, int tsc_mode)
> {
> struct hvm_info_table *va_hvm;
> uint8_t *va_map, sum;
> @@ -47,5 +47,6 @@ int hvm_build_set_params(int handle, uin
> xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN, viridian);
> #endif
> xc_set_hvm_param(handle, domid, HVM_PARAM_STORE_EVTCHN,
> store_evtchn);
> + xc_domain_set_tsc_info(handle, domid, tsc_mode, 0, 0, 0);
> return 0;
> }
> 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;
>
>
> --
> Eric CHANUDET
> XenClient Team
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-03-29 14:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 12:35 [PATCH] xl: tsc_mode parameter in guest configuration file Eric Chanudet
2010-03-29 14:11 ` Dan Magenheimer [this message]
2010-03-29 15:43 ` Vincent Hanquez
2010-03-29 18:32 ` Eric Chanudet
2010-03-29 19:49 ` Dan Magenheimer
2010-03-30 8:15 ` Vincent Hanquez
2010-03-29 15:45 ` Eric Chanudet
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=446767b3-2fdf-493f-9947-b5c57d70d556@default \
--to=dan.magenheimer@oracle.com \
--cc=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).