debuggers.hg

changeset 21144:aef25086c71c

xl: tsc_mode parameter in guest configuration file

Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 06 06:56:20 2010 +0100 (2010-04-06)
parents 29f271d3ceec
children a3f52abcd7da
files tools/libxl/libxl.h tools/libxl/libxl_dom.c tools/libxl/xl.c
line diff
     1.1 --- a/tools/libxl/libxl.h	Tue Apr 06 06:55:37 2010 +0100
     1.2 +++ b/tools/libxl/libxl.h	Tue Apr 06 06:56:20 2010 +0100
     1.3 @@ -74,6 +74,7 @@ typedef struct {
     1.4      int vpt_align;
     1.5      int max_vcpus;
     1.6      int cur_vcpus;
     1.7 +    int tsc_mode;
     1.8      uint32_t max_memkb;
     1.9      uint32_t target_memkb;
    1.10      uint32_t video_memkb;
     2.1 --- a/tools/libxl/libxl_dom.c	Tue Apr 06 06:55:37 2010 +0100
     2.2 +++ b/tools/libxl/libxl_dom.c	Tue Apr 06 06:56:20 2010 +0100
     2.3 @@ -72,6 +72,7 @@ int build_pre(struct libxl_ctx *ctx, uin
     2.4      xc_domain_set_memmap_limit(ctx->xch, domid, 
     2.5              (info->hvm) ? info->max_memkb : 
     2.6              (info->max_memkb + info->u.pv.slack_memkb));
     2.7 +    xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0);
     2.8  
     2.9      if (info->hvm) {
    2.10          unsigned long shadow;
     3.1 --- a/tools/libxl/xl.c	Tue Apr 06 06:55:37 2010 +0100
     3.2 +++ b/tools/libxl/xl.c	Tue Apr 06 06:56:20 2010 +0100
     3.3 @@ -235,6 +235,7 @@ static void printf_info(libxl_domain_cre
     3.4      printf("hpet: %d\n", b_info->hpet);
     3.5      printf("vpt_align: %d\n", b_info->vpt_align);
     3.6      printf("max_vcpus: %d\n", b_info->max_vcpus);
     3.7 +    printf("tsc_mode: %d\n", b_info->tsc_mode);
     3.8      printf("max_memkb: %d\n", b_info->max_memkb);
     3.9      printf("target_memkb: %d\n", b_info->target_memkb);
    3.10      printf("kernel: %s\n", b_info->kernel);
    3.11 @@ -382,6 +383,9 @@ static void parse_config_file(const char
    3.12          b_info->target_memkb = b_info->max_memkb;
    3.13      }
    3.14  
    3.15 +    if (!xlu_cfg_get_long(config, "tsc_mode", &l))
    3.16 +        b_info->tsc_mode = l;
    3.17 +
    3.18      if (!xlu_cfg_get_long (config, "shadow_memory", &l))
    3.19          b_info->shadow_memkb = l * 1024;
    3.20