aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* libxc: simplify lock profiling APIIan Campbell2010-10-181-6/+3
| | | | | | | | Current function has heavily overloaded semantics for the various arguments. Separate out into more specific functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: simplify performance counters APIIan Campbell2010-10-181-6/+3
| | | | | | | | Current function has heavily overloaded semantics for the various arguments. Separate out into more specific functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-1/+1
| | | | | | | | | | | | | | | | Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/misc: xen-hvmcrash: New tool to attempt to crash HVM guestsPaul Durrant2010-07-292-3/+146
| | | | | | | | | | | | This tool reads the CPU save records, overwrites RIP with a bogus value, and then restores them. This is, of course, not guaranteed to crash the guest (since the CPUs may not be executing in kernel at the time) but it's good for breaking into some tight loops that would be hard to debug otherwise. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Actually it's an interrupt descriptor table register :)Stefano Stabellini2010-07-191-1/+1
| | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
* tools/misc/xenpm: provide core/package cstate residenciesIan Jackson2010-07-141-3/+100
| | | | | | | | | | | | 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>
* tools/misc/xenpm: fix get-cpu-topologyIan Jackson2010-07-131-1/+1
| | | | | | fix get-cpu-topology Signed-off-by: Wei Gang <gang.wei@intel.com>
* xen-watchdog: Move init script to OS-dep dir and implement for netbsdKeir Fraser2010-06-092-63/+0
| | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools/misc: xen-watchdog script is Linux specificKeir Fraser2010-06-091-1/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xl: init scripts (v2)Keir Fraser2010-06-071-48/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Now the init script is called xencommons and, as the name suggests, it is a common script between xl and xend because it is used to start xenconsoled, xenstored and xenbackendd and the initialization of these three daemons has been removed from xend. The global xen_toolstack=xl/xend variable has been removed. Regarding the network setup, I made the vif scripts follow the same pattern as the other scripts in xen-backend: a new script called vif-setup is executed unconditionally. vif-setup is going to do the right thing depending on the value of the environmental variable "script" (same technique used before), defaulting to vif-bridge. In the common scenario the toolstack doesn't need to set the variable "script" because vif-bridge is going to be called anyway. There is no global network script to setup the network bridges with xl, so if you are using xl without xend, you need to manually configure the bridges using your distro network setup, or, if you are lazy, you can just add something like: /etc/xen/scripts/network-bridge start to your rc.local. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* tools: disable xen-hptool on ia64Keir Fraser2010-06-071-2/+4
| | | | | | | | | xen-hptool cannot be built on ia64, because xen-hptool depends on xc_offline_page.c and xc_offline_page.c does not support ia64. This patch disables it on ia64. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* xenwatchdogd: Fix build errorsKeir Fraser2010-06-071-3/+6
| | | | Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
* Watchdog timers for domainsKeir Fraser2010-06-043-3/+160
| | | | | | | | Each domain is allowed to set, reset and disable its timers; when any timer runs out the domain is killed. Patch from Christian Limpach <Christian.Limpach@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-285-85/+87
| | | | | | | | | | | | | | | | | | | | 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>
* xen-hptool: A few usage cleanups.Keir Fraser2010-05-191-23/+26
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenpm: remove wrong and pointless "current" indicatorKeir Fraser2010-05-071-4/+1
| | | | | | | | | Using the CPU number to compare with an index into an array containing only a subset of CPUs isn't valid. And indicator isn't necessary here at all since the CPU number being dealt with gets printed right before this line. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xen-hptool: Fix after interface change to xc_suspend_evtchn_release().Keir Fraser2010-05-041-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Tools: add online/offline hotplug user interfacesKeir Fraser2010-04-212-4/+333
| | | | | | | | | | | | | | | | | Exporting cpu on/offline and memory on/offline hotplug interfaces, so that users can do those (memory/cpu) hotplug actions with following command line freely: usage: xen-hptool <command> [args] xen-hptool command list:\n\n cpu-online <cpuid> online CPU <cpuid> cpu-offline <cpuid> offline CPU <cpuid> mem-online <mfn> online MEMORY <mfn> mem-offline <mfn> offline MEMORY <mfn> mem-status <mfn> query Memory status<mfn> Signed-off-by: Yunhong Jiang<yunhong.jiang@intel.com> Signed-off-by: Liping Ke <liping.ke@intel.com>
* Topology-info sysctl cleanups.Keir Fraser2010-04-131-22/+22
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Refactor Xen Support for Intel Turbo BoostKeir Fraser2010-04-091-4/+14
| | | | | | | | | | 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>
* tmem: add page deduplication with optional compression or ↵Keir Fraser2010-04-061-2/+28
| | | | | | | | | | | | | | | | trailing-zero-elimination Add "page deduplication" capability (with optional compression and trailing-zero elimination) to Xen's tmem. (Transparent to tmem-enabled guests.) Ephemeral pages that have the exact same content are "combined" so that only one page frame is needed. Since ephemeral pages are essentially read-only, no C-O-W (and thus no equivalent of swapping) is necessary. Deduplication can be combined with compression or "trailing zero elimination" for even more space savings. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* xenpm: Allow user to enable/disable dbs governor turbo mode.Keir Fraser2010-02-081-0/+50
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* tools/xen-detect: fix printing xen versionKeir Fraser2010-02-031-1/+1
| | | | | | | check_for_xen() should return xen version rather than boolean true if signature XenVMM is found. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* tools/gtraceview: fix SIGFPEKeir Fraser2010-01-291-2/+8
| | | | | | | If there are 0 or 1 valid record in xentrace file, SIGFPE will occur. Fix it. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* xen-detect: Add command-line arguments.Keir Fraser2009-12-231-9/+70
| | | | | | | | - Usage info - Quiesce normal output - Affect exit status if running in unexpected context Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Make Citrix copyright strinsg consistent.Keir Fraser2009-12-181-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xen-detect: Avoid dumping coreKeir Fraser2009-12-141-38/+20
| | | | | | | | | | | | | | F12 introduces a tool to automatically report bugs when there are core dumps. Since xen-detect relies on fork+waitpid in order to trap a SIGILL from a child, every time someone runs xen-detect on a bare metal kernel a bug is reported into Red Hat's Bugzilla. :-) However, even without this contingent need, leaving core dumps around is not nice. So this patch just traps SIGILL using signal/sentjmp/longjmp, without the need to fork. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xen-hvmctx: add recently added gtsc_khz field to outputKeir Fraser2009-11-031-0/+1
| | | | Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* lockprof: Fix x86_32 build and clean up coding styleKeir Fraser2009-10-151-16/+19
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Spinlock profiling (enable in build with lock_profile=y)Keir Fraser2009-10-142-3/+139
| | | | | | | Adds new tool xenlockprof to run from dom0. From: Juergen Gross <juergen.gross@ts.fujitsu.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86 hvm: Guests should scan CPUID range 40000000-4000ff00 for Xen leaves.Keir Fraser2009-09-161-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* pygrub: Set path in #! line of pygrub, tooKeir Fraser2009-08-251-5/+0
| | | | | | | | | | | | | pygrub currently has a hardcoded path of /usr/bin/python which is not correct if the version of python at install time is not the same as that at build time. This patch uses the existing install-wrap and python/get-path machinery. (It does not address the currently-existing bug that the get-path machinery works by assuming that `python' is a symlink, rather than querying the python interpreter for its version.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen-hvmctx: don't compile for ia64.Keir Fraser2009-08-191-3/+4
| | | | | | xen-hvmctx is a x86 specific tool so that it shouldn't compile for ia64. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* xen pm trace utility cleanupKeir Fraser2009-08-192-2/+3
| | | | | | | | | | | xenpm trace utility gtraceview cleanup - add gtraceview help info on how to get raw data by xentrace - make trace_exit_reason compiled in non-debug mode. trace_exit_reason can be enable/disabled by xentrace at runtime, so no need to disable it at build time. Signed-off-by: Yu Ke <ke.yu@intel.com>
* xen-hvmctx: a tool to print the HVM state of a running domainKeir Fraser2009-08-142-3/+453
| | | | | Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tmem: one-liner correcting stat parsing orderingKeir Fraser2009-08-121-1/+1
| | | | Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tools: xenbackendd for NetBSDKeir Fraser2009-07-221-0/+11
| | | | | | | | | | | | | | | | Attached patch introduces xenbackendd. It is used on NetBSD to launch the hotplug scripts. Later xenbackendd can be improved to also launch qemu-dm as child process and will notice when qemu-dm crashes. The changes the patch makes: - rename hotplug scripts as xenbackendd expects them (current names were taken from pkgsrc) - install hotplug scripts as executable scripts - introduce xenbackendd - build/install/launch on NetBSD only Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: Always check for __linux__ not __Linux__Keir Fraser2009-07-021-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* gtraceview: compile fixes for NetBSD.Keir Fraser2009-07-022-1/+7
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86 Cx tracing: adds gtraceview & gtracestat utilitiesKeir Fraser2009-06-293-3/+2318
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* tmem: extra statsKeir Fraser2009-06-271-0/+7
| | | | | | | This patch collects a few additional valuable per-domain performance stats. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* tmem: shared ephemeral (SE) pool (clustering) fixesKeir Fraser2009-06-011-4/+20
| | | | | | | | | | | | | | | | | Tmem can share clean page cache pages for Linux domains in a virtual cluster (currently only the ocfs2 filesystem has a patch on the Linux side). So when one domain "puts" (evicts) a page, any domain in the cluster can "get" it, thus saving disk reads. This functionality is already present; these are only bug fixes. - fix bugs when an SE pool is destroyed - fixes in parsing tool for xm tmem-list output for SE pools - incorrect locking in one case for destroying an SE pool - clearer verbosity for transfer when an SE pool is destroyed - minor cleanup: merge routines that are mostly duplicate Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* Transcendent memory ("tmem") for Xen.Keir Fraser2009-05-262-2/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tmem, when called from a tmem-capable (paravirtualized) guest, makes use of otherwise unutilized ("fallow") memory to create and manage pools of pages that can be accessed from the guest either as "ephemeral" pages or as "persistent" pages. In either case, the pages are not directly addressible by the guest, only copied to and fro via the tmem interface. Ephemeral pages are a nice place for a guest to put recently evicted clean pages that it might need again; these pages can be reclaimed synchronously by Xen for other guests or other uses. Persistent pages are a nice place for a guest to put "swap" pages to avoid sending them to disk. These pages retain data as long as the guest lives, but count against the guest memory allocation. Tmem pages may optionally be compressed and, in certain cases, can be shared between guests. Tmem also handles concurrency nicely and provides limited QoS settings to combat malicious DoS attempts. Save/restore and live migration support is not yet provided. Tmem is primarily targeted for an x86 64-bit hypervisor. On a 32-bit x86 hypervisor, it has limited functionality and testing due to limitations of the xen heap. Nearly all of tmem is architecture-independent; three routines remain to be ported to ia64 and it should work on that architecture too. It is also structured to be portable to non-Xen environments. Tmem defaults off (for now) and must be enabled with a "tmem" xen boot option (and does nothing unless a tmem-capable guest is running). The "tmem_compress" boot option enables compression which takes about 10x more CPU but approximately doubles the number of pages that can be stored. Tmem can be controlled via several "xm" commands and many interesting tmem statistics can be obtained. A README and internal specification will follow, but lots of useful prose about tmem, as well as Linux patches, can be found at http://oss.oracle.com/projects/tmem . Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* sbdf2devicepath: converts SBDF into device path.Keir Fraser2009-04-091-0/+82
| | | | | | | | | | | | | | 'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#" ex) 0000:0a:1f.3 Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]" ex) PNP0A08:0-2.0-0.0 The command can be executed as follows. # sbdf2devicepath 0a:1f.3 PNP0A08:0-2.0-0.0 Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* tools: Always use sane upstream (`native') python pathsKeir Fraser2009-04-086-51/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, by default we would install our python modules into /usr/lib/python/xen, for example /usr/lib/python/xen/__init__.py. Upstream python's standard install location (a) includes the Python version number and (b) puts things in site-packages by default. Our best conjecture for the reason for this was an attempt to make the installs portable between different python versions. However, that doesn't work because compiled python modules (.pyc), and C python extensions corresponding to one version of python, are not compatible across different versions of python. This is why upstream include the version number. site-packages is the standard location for locally-installed packages and is automatically included on the python search path. In this change, we abandon our own unusual python path setup: * Invoke setup.py in an entirely standard manner. We pass PREFIX and DESTDIR using the appropriate options provided by setup.py for those purposes (adding them to setup.py calls which were previously lacking them). * Since the installation locations are now on the standard python path, we no longer need to add anything to the path in any of our python utilities. Therefore remove all that code from every python script. (Many of these scripts unconditionally added /usr/lib/python and /usr/lib64/python which is wrong even in the old world.) * There is no longer any special `Xen python path'. xen-python-path is no longer needed. It is no longer called by anything in our tree. However since out-of-tree callers may still invoke it, we retain it. It now prints a fixed string referring to a directory which does not to exist; callers (who use it to augment their python path) will thus add a nonexistent directory to their python path which is harmless. * Remove various workarounds including use of setup.py --home (which is intended for something completely different). * Remove tests for the XEN_PYTHON_NATIVE_INSTALL build-time environment variable. The new behaviour is the behaviour which we should have had if this variable had been set. That is, it is now as if this variable was always set but also bugs in the resulting install have been fixed. This should be a proper fix for the bug addressed by c/s 19515. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/misc: Remove some obsolete scripts.Keir Fraser2009-04-064-125/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Revert c/s 19504 -- uses an obsolete sysfs interface.Keir Fraser2009-04-062-79/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Add device-path command to convert SBDF into device path.Keir Fraser2009-04-062-1/+79
| | | | | | | | | | | | | | 'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#" ex) 0000:0a:1f.3 Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]" ex) PNP0A08:0-2.0-0.0 The command can be executed as follows. # device_path 0a:1f.3 PNP0A08:0-2.0-0.0 Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* xenpm: Set scheduler vcpu_migration_delay by xenpmKeir Fraser2009-04-061-0/+52
| | | | | Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
* xenpm: add cmd set-max-cstateKeir Fraser2009-03-311-1/+34
| | | | Signed-off-by: Wei Gang <gang.wei@intel.com>