Commit Graph
94 Commits
Author SHA1 Message Date
Keir Fraser 41570d67e7 tools/misc: xen-watchdog script is Linux specific
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:29:10 +01:00
Keir Fraser 6b0b6e01b9 tools: disable xen-hptool on ia64
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>
2010-06-07 15:45:56 +01:00
Keir Fraser 78c8506e77 Watchdog timers for domains
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>
2010-06-04 11:35:23 +01:00
Keir Fraser 284d5633be Tools: add online/offline hotplug user interfaces
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>
2010-04-21 08:29:26 +01:00
Keir Fraser 0482af4d96 Spinlock profiling (enable in build with lock_profile=y)
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>
2009-10-14 09:07:51 +01:00
Keir Fraser 6c6b085bec pygrub: Set path in #! line of pygrub, too
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>
2009-08-25 14:57:45 +01:00
Keir Fraser bad456af01 xen-hvmctx: don't compile for ia64.
xen-hvmctx is a x86 specific tool so that it shouldn't compile for ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-08-19 14:22:15 +01:00
Keir Fraser b5eb2dabf5 xen-hvmctx: a tool to print the HVM state of a running domain
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-14 17:26:23 +01:00
Keir Fraser 47eb698d53 gtraceview: compile fixes for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-02 11:36:17 +01:00
Keir Fraser 5dc9ac92ad x86 Cx tracing: adds gtraceview & gtracestat utilities
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2009-06-29 11:03:24 +01:00
Keir Fraser 6009f4ddb2 Transcendent memory ("tmem") for Xen.
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>
2009-05-26 11:05:04 +01:00
Keir Fraser e6e6785c99 tools/misc: Remove some obsolete scripts.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-04-06 21:12:33 +01:00
Keir Fraser 1a4c39bf21 Revert c/s 19504 -- uses an obsolete sysfs interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-04-06 20:56:02 +01:00
Keir Fraser fdd33002ee tools: Add device-path command to convert SBDF into device path.
'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>
2009-04-06 13:52:56 +01:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser 6bb3a63089 [IA64] compile xenpm for ia64.
Now ia64 supports cpufreq, compile xenpm.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-10 10:00:21 +01:00
Keir Fraser 876bb8d639 x86: Add xenpm utility to list CPU power info.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-25 10:21:40 +01:00
Keir Fraser cd6d8982db Push python-related make variable definitions into tools/misc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-11 09:44:42 +01:00
Keir Fraser 9f88f46834 Have `make install' write the Python version number in the #!
The Xen tools contain a number of Python extensions written in C.  The
C API to Python, used by these extensions, is not stable from one
version of Python to the next.

Our build system uses whatever version of Python is the default on the
build system at that time to build these extensions.  However, the
actual scripts such as `xm' use  #!/usr/bin/env python  which uses
whichever version of Python is the default on the deployment system at
the time of invocation.

If for any reason these two versions of Python are not the same (eg,
because the system is built on one computer and executed on another,
or because the system's gains a more recent Python installation
alongside the original which changes the previous default), warnings
and failures occur.

In this patch I arrange for Python scripts to be installed via a
special wrapper around `install', which determines the build-time
Python version and path and then writes that into the #! line at the
point of `make install' (or `make dist').  (It can also be overridden
by setting PYTHON_PATH.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-06-11 09:36:23 +01:00
Keir Fraser ad44c013ec Define CFLAGS and LDFLAGS for libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:57:14 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:38:44 +00:00
Keir Fraser 93e3de7b94 Add SBINDIR. Use it always.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:02 +00:00
Keir Fraser 83f34fdcdd Add BINDIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:31:10 +00:00
Keir Fraser 9bb7f7e2ac tools: disable lomount and miniterm by default
lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach.  For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region.  This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings.  So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
 * CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
   can enable and disable these programs
 * They are disabled by default
 * If CONFIG_MINITERM=y it is still built but not installed.
   make -C tools/misc/miniterm install  will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:18:38 +00:00
Keir Fraser d2477385df tools: LDFLAGS in link lines
LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:17:22 +00:00
Keir Fraser a687f4cc2f xsview: a xenstore viewer written in PyQT.
From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-04 13:52:51 +01:00
Tim Deegan 7133144e3a Remove xc_shadow tool
It predates the current shadow architecture and only performs an explicitly
invalid shadow operation (on itself).
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-03-23 10:46:39 +00:00
kfraser@localhost.localdomain b15e0dd802 Fix non-x86 build. 2007-02-08 21:36:35 +00:00
kfraser@localhost.localdomain c68414307b Fix xen-detect build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-08 17:07:36 +00:00
Keir Fraser d4a9cc1513 Add example xen-detect.c code for detecting application execution in
Xen PV or HVM contexts, using the Xen CPUID extensions.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-08 17:04:26 +00:00
Ewan Mellor a84714b11c Break out the Python path interrogation into a separate script. This has the
advantage that the temporary path manipulation cannot affect the main script,
and that it can be shared with other programs, such as xm-test.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-02-01 12:48:53 +00:00
kfraser@localhost.localdomain 6f007b178f Remove obsolete tool 'mbootpack'. SYSLINUX now supports Multiboot format.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-17 16:13:13 +01:00
kfraser@localhost.localdomain 6311dc03da Clean up duplication of 'install' macros in the Makefiles.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 15:57:05 +01:00
kfraser@localhost.localdomain ae95fdf65a [TOOLS] Remove the 'cpuperf' misc tool. Xenoprof is the
correct tool to use for hardware perfctr monitoring now.
Also remove unused xc_msr MSR accessor functions from libxenctrl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 15:02:55 +01:00
kfraser@dhcp93.uk.xensource.com 3f2522e1ac Use a global build configuration file, and rework libxc Makefile for PPC.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-05-31 11:31:52 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk d27fbb0061 Move 'debug' build option into the outermost Config.mk file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-09 22:31:45 +01:00
kaf24@firebug.cl.cam.ac.uk 326450f67e Clean up the usage of CFLAGS. This is nice for packagers, who would
like to control the base compilation flags from a central place.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-09 21:17:45 +01:00
emellor@leeni.uk.xensource.com 74f2b3c56d Added xen-bugtool, an application that collects various system logs and can
save them as a tarball, or submit them to a pre-existing bugzilla bug.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-28 01:47:28 +00:00
cl349@firebug.cl.cam.ac.uk 60eb663513 Rename libxc => libxenctrl and xc.h => xen/xenctrl.h
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>


--HG--
rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
2005-08-24 23:07:29 +00:00
kaf24@firebug.cl.cam.ac.uk 12b1a321bd Here is our latest patch to enable the Xen tools to
build and work with IA64 Xen.
Signed-off-by: Matt Chapman <matthewc@hp.com>
Acked-by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-07-29 10:34:45 +00:00
iap10@freefall.cl.cam.ac.uk 3299c3f678 Incorporate lomount from QEMU into tools/misc. This tool makes it easy to mount
individual partitions held within whole disk images.
 
Original source from http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/l
omount/lomount.c
 
 * Copyright (c) 2004 Jim Brown 
 * Copyright (c) 2004 Brad Watson
 * Copyright (c) 2004 Mulyadi Santosa
 
Signed-off-by: ian@xensource.com
2005-07-14 21:02:05 +00:00
cl349@firebug.cl.cam.ac.uk 76105d8a76 bitkeeper revision 1.1542.1.1 (42943a71LGhR_dI1LOX6lKtJ08zzTA)
setup.py, Makefile:
  Remove XenSV -- it's been broken since twisted was removed.
Many files:
  Delete: tools/misc/xensv
  Delete: tools/python/xen/sv/params.py
  Delete: tools/python/xen/sv/__init__.py
  Delete: tools/python/xen/sv/MigrateDomain.py
  Delete: tools/python/xen/sv/Daemon.py
  Delete: tools/python/xen/sv/util.py
  Delete: tools/python/xen/sv/Wizard.py
  Delete: tools/python/xen/sv/TabView.py
  Delete: tools/python/xen/sv/SaveDomain.py
  Delete: tools/python/xen/sv/RestoreDomain.py
  Delete: tools/python/xen/sv/NodeInfo.py
  Delete: tools/python/xen/sv/Main.py
  Delete: tools/python/xen/sv/HTMLBase.py
  Delete: tools/python/xen/sv/GenTabbed.py
  Delete: tools/python/xen/sv/DomList.py
  Delete: tools/python/xen/sv/DomInfo.py
  Delete: tools/python/xen/sv/CreateDomain.py
  Delete: tools/sv/images/unpause.png
  Delete: tools/sv/images/small-unpause.png
  Delete: tools/sv/images/small-pause.png
  Delete: tools/sv/images/small-destroy.png
  Delete: tools/sv/images/shutdown.png
  Delete: tools/sv/images/seperator.jpg
  Delete: tools/sv/images/right-end-highlight.jpg
  Delete: tools/sv/images/reboot.png
  Delete: tools/sv/images/previous.png
  Delete: tools/sv/images/pause.png
  Delete: tools/sv/images/orb_02.jpg
  Delete: tools/sv/images/next.png
  Delete: tools/sv/images/middle-no-highlight.jpg
  Delete: tools/sv/images/middle-highlight.jpg
  Delete: tools/sv/images/left-end-no-highlight.jpg
  Delete: tools/sv/images/left-end-highlight.jpg
  Delete: tools/sv/images/finish.png
  Delete: tools/sv/images/destroy.png
  Delete: tools/sv/inc/style.css
  Delete: tools/sv/images/seperator-right-highlight.jpg
  Delete: tools/sv/images/seperator-left-highlight.jpg
  Delete: tools/sv/inc/script.js
  Delete: tools/sv/images/right-end-no-highlight.jpg
  Delete: tools/sv/images/orb_01.jpg
  Delete: tools/sv/Makefile
  Delete: tools/sv/Main.rpy
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-25 08:42:25 +00:00
cl349@firebug.cl.cam.ac.uk 519108b9f7 bitkeeper revision 1.1534.1.1 (429399e0oJudIjoFsgWFxNKnCM7qTg)
Nothing but vnet uses libxutil -- move it there.
Makefile, xc.c, setup.py, configure, configure.in, Makefile.in:
  This doesn't use libxutil.
Makefile, Makefile.vnet, Rules.mk:
  Move libxutil into vnet since it's only used there.
Many files:
  mvdir
2005-05-24 21:17:20 +00:00
mafetter@fleming.research 52367cb022 bitkeeper revision 1.1267 (4251679dHqcry__n_OW9aNhfUtjZ_A)
Hand merged

Signed-off-by: michael.fetterman@cl.cam.ac.uk
2005-04-04 16:13:17 +00:00
tjd21@arcadians.cl.cam.ac.uk 4ceed52eee bitkeeper revision 1.1236.1.149 (42492762NRUXAIqtzpmd2lX5HSPVog)
Added the mbootpack tool, which packages multiboot boot files and
disguises them as a linux bzImage.  Useful for booting Xen using
pxelinux, or another linux-only bootloader.

Signed-off-by: Tim Deegan <Tim.Deegan@cl.cam.ac.uk>
2005-03-29 10:01:06 +00:00
mafetter@fleming.research 8e9bb87813 bitkeeper revision 1.1264 (4243449d-JwBVsSinjAWdYveMNhEjQ)
Initial attempt at merging shadow code with head of unstable tree.

Signed-off-by: michael.fetterman@cl.cam.ac.uk
2005-03-24 22:52:13 +00:00
kaf24@firebug.cl.cam.ac.uk ab78c96aeb bitkeeper revision 1.1236.1.105 (423fdeaeuXmbQUj74cWh1nItpSKUjw)
Improved cross-compilation support.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-22 09:00:30 +00:00
doogie@brainfood.com[kaf24] be7913c187 bitkeeper revision 1.1159.270.3 (42330ae8efsd9SdlhNX6EpksrtV6oQ)
[PATCH] add-build.patch

 Add build targets to all makefiles.  Debian does builds as non-root, so
 it's better to do as much as possible before requiring root privs.
Signed-off-by: Adam Heath <doogie@brainfood.com>
2005-03-12 15:29:44 +00:00
rneugeba@wyvis.research.intel-research.net ab5301ae22 bitkeeper revision 1.1244 (42308dfaWqh7O5QB-sS9WJ1R4LYoEA)
various hacks for batching mode and stats gathering

Signed-off-by: michael.fetterman@cl.cam.ac.uk
2005-03-10 18:12:10 +00:00