WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] tools/libxl: allow setting of timer_mo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] tools/libxl: allow setting of timer_mode, hpet and vpt_align parameters
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Jul 2010 02:11:13 -0700
Delivery-date: Thu, 08 Jul 2010 02:18:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1278438230 -3600
# Node ID 9a4783e7eacb30ae723959565cd5c62d224ffc9f
# Parent  d290a10cd22632afb83ab9b08ad2514b4f0447f9
tools/libxl: allow setting of timer_mode, hpet and vpt_align parameters

Implement parsing for timer_mode, hpet and vpt_align parameters.

These are all HVM only parameters and hpet/vpt_align are boolean so
change types and place in hvm union accordingly. Also HPET is x86 only
on principle so make this compile-time conditional on arch as-is
viridian.

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
xen-unstable changeset:   21739:da46b25cf17d
xen-unstable date:        Tue Jul 06 16:55:49 2010 +0100
---
 tools/libxl/libxl.h      |    6 +++---
 tools/libxl/libxl_dom.c  |    7 -------
 tools/libxl/xenguest.c   |    3 +++
 tools/libxl/xl_cmdimpl.c |   18 ++++++++++++------
 4 files changed, 18 insertions(+), 16 deletions(-)

diff -r d290a10cd226 -r 9a4783e7eacb tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Jul 06 16:57:07 2010 +0100
+++ b/tools/libxl/libxl.h       Tue Jul 06 18:43:50 2010 +0100
@@ -88,9 +88,6 @@ typedef struct {
 } libxl_domain_create_info;
 
 typedef struct {
-    int timer_mode;
-    int hpet;
-    int vpt_align;
     int max_vcpus;
     int cur_vcpus;
     int tsc_mode;
@@ -108,6 +105,9 @@ typedef struct {
             bool nx;
             bool viridian;
             char *timeoffset;
+            bool hpet;
+            bool vpt_align;
+            int timer_mode;
         } hvm;
         struct {
             uint32_t   slack_memkb;
diff -r d290a10cd226 -r 9a4783e7eacb tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue Jul 06 16:57:07 2010 +0100
+++ b/tools/libxl/libxl_dom.c   Tue Jul 06 18:43:50 2010 +0100
@@ -62,13 +62,6 @@ int build_pre(struct libxl_ctx *ctx, uin
 int build_pre(struct libxl_ctx *ctx, uint32_t domid,
               libxl_domain_build_info *info, libxl_domain_build_state *state)
 {
-    if (info->timer_mode != -1)
-        xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_TIMER_MODE,
-                (unsigned long) info->timer_mode);
-    if (info->hpet != -1)
-        xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_HPET_ENABLED, (unsigned 
long) info->hpet);
-    if (info->vpt_align != -1)
-        xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_VPT_ALIGN, (unsigned long) 
info->vpt_align);
     xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus);
     xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb + 
LIBXL_MAXMEM_CONSTANT);
     xc_domain_set_memmap_limit(ctx->xch, domid, 
diff -r d290a10cd226 -r 9a4783e7eacb tools/libxl/xenguest.c
--- a/tools/libxl/xenguest.c    Tue Jul 06 16:57:07 2010 +0100
+++ b/tools/libxl/xenguest.c    Tue Jul 06 18:43:50 2010 +0100
@@ -49,7 +49,10 @@ int hvm_build_set_params(int handle, uin
     xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED, info->u.hvm.pae);
 #if defined(__i386__) || defined(__x86_64__)
     xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN, info->u.hvm.viridian);
+    xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED, (unsigned long) 
info->u.hvm.hpet);
 #endif
+    xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, (unsigned long) 
info->u.hvm.timer_mode);
+    xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN, (unsigned long) 
info->u.hvm.vpt_align);
     xc_set_hvm_param(handle, domid, HVM_PARAM_STORE_EVTCHN, store_evtchn);
     return 0;
 }
diff -r d290a10cd226 -r 9a4783e7eacb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Jul 06 16:57:07 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Jul 06 18:43:50 2010 +0100
@@ -178,9 +178,6 @@ static void init_build_info(libxl_domain
 static void init_build_info(libxl_domain_build_info *b_info, 
libxl_domain_create_info *c_info)
 {
     memset(b_info, '\0', sizeof(*b_info));
-    b_info->timer_mode = -1;
-    b_info->hpet = 1;
-    b_info->vpt_align = -1;
     b_info->max_vcpus = 1;
     b_info->max_memkb = 32 * 1024;
     b_info->target_memkb = b_info->max_memkb;
@@ -194,6 +191,9 @@ static void init_build_info(libxl_domain
         b_info->u.hvm.acpi = 1;
         b_info->u.hvm.nx = 1;
         b_info->u.hvm.viridian = 0;
+        b_info->u.hvm.hpet = 1;
+        b_info->u.hvm.vpt_align = 1;
+        b_info->u.hvm.timer_mode = 0;
     } else {
         b_info->u.pv.slack_memkb = 8 * 1024;
     }
@@ -321,9 +321,6 @@ static void printf_info(int domid,
 
 
     printf("\t(domain_build_info)\n");
-    printf("\t(timer_mode %d)\n", b_info->timer_mode);
-    printf("\t(hpet %d)\n", b_info->hpet);
-    printf("\t(vpt_align %d)\n", b_info->vpt_align);
     printf("\t(max_vcpus %d)\n", b_info->max_vcpus);
     printf("\t(tsc_mode %d)\n", b_info->tsc_mode);
     printf("\t(max_memkb %d)\n", b_info->max_memkb);
@@ -340,6 +337,9 @@ static void printf_info(int domid,
         printf("\t\t\t(acpi %d)\n", b_info->u.hvm.acpi);
         printf("\t\t\t(nx %d)\n", b_info->u.hvm.nx);
         printf("\t\t\t(viridian %d)\n", b_info->u.hvm.viridian);
+        printf("\t\t\t(hpet %d)\n", b_info->u.hvm.hpet);
+        printf("\t\t\t(vpt_align %d)\n", b_info->u.hvm.vpt_align);
+        printf("\t\t\t(timer_mode %d)\n", b_info->u.hvm.timer_mode);
 
         printf("\t\t\t(device_model %s)\n", dm_info->device_model);
         printf("\t\t\t(videoram %d)\n", dm_info->videoram);
@@ -524,6 +524,12 @@ static void parse_config_data(const char
             b_info->u.hvm.nx = l;
         if (!xlu_cfg_get_long (config, "viridian", &l))
             b_info->u.hvm.viridian = l;
+        if (!xlu_cfg_get_long (config, "hpet", &l))
+            b_info->u.hvm.hpet = l;
+        if (!xlu_cfg_get_long (config, "vpt_align", &l))
+            b_info->u.hvm.vpt_align = l;
+        if (!xlu_cfg_get_long (config, "timer_mode", &l))
+            b_info->u.hvm.timer_mode = l;
     } else {
         char *cmdline = NULL;
         const char *root = NULL, *extra = "";

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] tools/libxl: allow setting of timer_mode, hpet and vpt_align parameters, Xen patchbot-4.0-testing <=