aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc
Commit message (Collapse)AuthorAgeFilesLines
* tools/libxc: Fix x86_32 build breakage in previous changeset.Keir Fraser2011-12-061-7/+10
| | | | | | | | | | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 24345:491c3ebf1d37 xen-unstable date: Fri Dec 02 08:40:02 2011 -0800 tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone Pushing stuff onto the stack on x86-64 when we do not specify -mno-red-zone is unsafe. Since the complicated asm is due to register pressure on i386, we simply implement an all-new simpler alternative for x86-64. Signed-off-by: Keir Fraser <keir@xen.org> Acked-by: Jan Beulich <jbeulich@novell.com> xen-unstable changeset: 24344:72f4e4cb7440 xen-unstable date: Fri Dec 02 06:31:14 2011 -0800
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-10-064-4/+4
| | | | | | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 23049:ff3b7749008b Backport-requested-by: Allen M Kay <allen.m.kay@intel.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen-detect: Fix cpuid asm for 32-bit PIC compilation.Keir Fraser2011-06-231-17/+20
| | | | | | Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 23553:eca057e4475c xen-unstable date: Fri Jun 17 08:08:13 2011 +0100
* tools: gtracestate: fix several problemsWei Gang2011-03-031-13/+18
| | | | | | | | | | | | | | | Fixed problems include: * previously just print out a error instead of help info while running without cmdline parameters. * -u & -n lead to Segmentation fault. * -c and then use default ranges, the default ranges is not 50us... but 50000/tsc2us.... Signed-off-by: Wei Gang <gang.wei@intel.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/misc/xen-hptool: Silently retry on CPU hotplug EBUSY failure.Keir Fraser2011-01-141-2/+17
| | | | | | | | EBUSY is a legitimate soft failure, due to inability to acquire a lock, or because RCU work has not been done since a CPU was last offlined. Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-4/+5
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. 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-6/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* xenpm: use hypercall buffers.Ian Campbell2010-10-221-14/+42
| | | | | 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-222-52/+16
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* 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>