aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_pm.c
Commit message (Collapse)AuthorAgeFilesLines
* libxc/pm: Fix NULL pointer checks.Andrew Cooper2013-09-101-7/+7
| | | | | | | | | | | | | | | | Discovered by Coverity, CIDs 1054968 1054969 1054970 1054971 1054972 1054973 10549704 This was broken by c/s 5cc436c1d2b3b0 which did a blanket change of 'int xc_handle' -> 'xc_interface *xch'. The types got updated, but error conditions were left as-were. (I suspect some sed was involved originally) Also while playing around in this area, fix up some of the bracketing style to match the Xen coding style. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
* x86 pm: provide CC7/PC2 residencyYang Zhang2011-10-251-0/+2
| | | | | | | | | Sandy bridge introduces new MSR to get cc7/pc2 residency (core C-state 7/package C-state 2). Print the cc7/pc2 residency when on sandy bridge platform. Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* libxc: fix bounce buffers in xc_pm_get_cx_stat and xc_pm_get_pxstatIan Campbell2010-11-031-4/+4
| | | | | | | | | We should bounce the buffers themselves, not the pointers to them! Error introduced by 22292:a1b39d2b9001 and reported by Yang Z Zhang. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: finalise transition to hypercall buffers.Ian Campbell2010-10-221-7/+7
| | | | | | | | | | | | | | | | | | | | | Rename xc_set_xen_guest_handle to set_xen_guest_handle[0] and remove now unused functions: - xc_memalign - lock_pages - unlock_pages - hcall_buf_prep - hcall_buf_release [0] sed -i -e 's/xc_set_xen_guest_handle/set_xen_guest_handle/g' \ tools/libxc/*.[ch] \ tools/python/xen/lowlevel/xc/xc.c \ tools/python/xen/lowlevel/acm/acm.c \ tools/libxc/ia64/xc_ia64_stubs.c \ tools/security/secpol_tool.c \ tools/misc/xenpm.c Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert sysctl interfaces over to hypercall buffersIan Campbell2010-10-221-46/+49
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: pass an xc_interface handle to page locking functionsIan Campbell2010-10-181-19/+19
| | | | | | | | | Not actually used here but useful to confirm that a handle is passed down to each location where it will be required once we switch to hypercall buffers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* # HG changeset patchIan Campbell2010-08-241-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | # User Ian Campbell <ian.campbell@citrix.com> # Date 1282671421 -3600 # Node ID d1dd29a470ef1b9d2c77478a123326036dfe90bb # Parent d7a4adad9c328decbd384d87b23001aea8951b86 tools/libxc, tools/libelf: Relicense under LGPL v2.1 Relicense these two libraries under LGPL v2.1 only except where individual files already included the "or later" provision. Copyright holders have been contacted by Stephen Spector and have all agreed this change. Removed tools/libxc/ia64/aclinux.h since it appeared to be unused. There is a separate, more up to date, copy in xen/include/acpi/platform/aclinux.h which does appear to be used. Clarify the license of MiniOS privcmd.h under the same terms as other tools/include/xen-sys headers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stephen Spector <stephen.spector@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/misc/xenpm: provide core/package cstate residenciesIan Jackson2010-07-141-0/+5
| | | | | | | | | | | | According to Intel 64 and IA32 Architectures SDM 3B Appendix B, Intel Nehalem/Westmere processors provide h/w MSR to report the core/package cstate residencies.Extend sysctl_get_pmstat interface to pass the core/package cstate residencies, and modify xenpm to output those information. [tools part of the patch] Signed-off-by: Wei Gang <gang.wei@intel.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-44/+44
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Topology-info sysctl cleanups.Keir Fraser2010-04-131-20/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Refactor Xen Support for Intel Turbo BoostKeir Fraser2010-04-091-0/+1
| | | | | | | | | | Refactor the existing code that supports the Intel Turbo feature to move all the driver specific bits in the cpufreq driver. Create a tri-state interface for the Turbo feature that can distinguish amongst enabled Turbo, disabled Turbo, and processors that don't support Turbo at all. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
* xenpm: Allow user to enable/disable dbs governor turbo mode.Keir Fraser2010-02-081-0/+25
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* domctl/sysctl: Clean up definitionsKeir Fraser2009-12-221-15/+15
| | | | | | | | - Use fixed-width types only - Use named unions only - Bump domctl version number Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenpm: Set scheduler vcpu_migration_delay by xenpmKeir Fraser2009-04-061-0/+30
| | | | | Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
* cpuidle: export max_cstate access via libxcKeir Fraser2009-03-311-0/+33
| | | | Signed-off-by: Wei Gang <gang.wei@intel.com>
* xenpm: Add a small scheduler knob "sched_smt_power_savings"Keir Fraser2009-03-201-0/+17
| | | | | | | | | Current scheduler only care performance, thus always picks pCPU from the most idle package. This knob provides another option to pick pCPU from least idle package, for user who want performance power balance. Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Tian Kevin <kevin.tian@intel.com>
* Deliver cpufreq actual average freq to libxc interfaceKeir Fraser2009-03-201-0/+18
| | | | | | | Calculate cpu actual average freq according to aperf and mperf MSR and then deliver to libxc interface Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* xenpm: Add CPU topology info (thread/core/socket)Keir Fraser2009-03-131-0/+21
| | | | | | | | | | | | CPU topology info is necessary for power management analysis. For example, to analysis the effect of Px state coordination, Cx package/core coordination, the thread/core/socket topology information is needed. This patch add new command "get-cpu-topology" in xenpm to print the CPU topology info: Signed-off-by: Yu Ke <ke.yu@intel.com>
* xc_pm: Fix off-by-one error in string array access.Keir Fraser2008-12-131-1/+1
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* libxc: Fix xc_pm.c build by avoiding bogus header includes.Keir Fraser2008-12-111-5/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add user PM control interfaceKeir Fraser2008-12-101-0/+140
| | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* X86 and IA64: Update cpufreq statistic logic for supporting both x86Keir Fraser2008-09-261-0/+1
| | | | | | | and ia64 Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Add statistic interface for cx.Keir Fraser2008-05-211-0/+68
| | | | | | | Implement statistic interface for cx via sysctl & libxc. Provide a easy way to collect processor cx info within dom0. Signed-off-by: Wei Gang <gang.wei@intel.com>
* Provide Px statistic data to user through libxcKeir Fraser2008-05-161-0/+101
Sampling and collecting dynamic Px statistic data, including Px state value, Px count, Px residency time, Px transition matrix, etc. Provide Px statistic data to user through libxc. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>