diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-08 08:48:40 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-08 08:48:40 +0000 |
commit | d2a92c94a1b314750a94b902e9584200b2b507b0 (patch) | |
tree | 9b52b5ef5f93725be81e517586f08d57a8a81f31 /tools/libxc/xc_pm.c | |
parent | 43d6e1096b0df2b2ba0780fa41b525e11518e520 (diff) | |
download | xen-d2a92c94a1b314750a94b902e9584200b2b507b0.tar.gz xen-d2a92c94a1b314750a94b902e9584200b2b507b0.tar.bz2 xen-d2a92c94a1b314750a94b902e9584200b2b507b0.zip |
xenpm: Allow user to enable/disable dbs governor turbo mode.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Diffstat (limited to 'tools/libxc/xc_pm.c')
-rw-r--r-- | tools/libxc/xc_pm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c index bb9a80c9e2..7d588346d5 100644 --- a/tools/libxc/xc_pm.c +++ b/tools/libxc/xc_pm.c @@ -425,3 +425,28 @@ int xc_set_cpuidle_max_cstate(int xc_handle, uint32_t value) return do_sysctl(xc_handle, &sysctl); } +int xc_enable_turbo(int xc_handle, int cpuid) +{ + DECLARE_SYSCTL; + + if ( xc_handle < 0 ) + return -EINVAL; + + sysctl.cmd = XEN_SYSCTL_pm_op; + sysctl.u.pm_op.cmd = XEN_SYSCTL_pm_op_enable_turbo; + sysctl.u.pm_op.cpuid = cpuid; + return do_sysctl(xc_handle, &sysctl); +} + +int xc_disable_turbo(int xc_handle, int cpuid) +{ + DECLARE_SYSCTL; + + if ( xc_handle < 0 ) + return -EINVAL; + + sysctl.cmd = XEN_SYSCTL_pm_op; + sysctl.u.pm_op.cmd = XEN_SYSCTL_pm_op_disable_turbo; + sysctl.u.pm_op.cpuid = cpuid; + return do_sysctl(xc_handle, &sysctl); +} |