Commit Graph
230 Commits
Author SHA1 Message Date
Keir Fraser 68c053e8a9 xend: Allow xenconsoled to be passed arguments at startup
Attached patch allows to pass arguments to xenconsoled
via XENCONSOLED_TRACE env. variable analogous to xenstored.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-08-13 13:42:30 +01:00
Keir Fraser c20060b5e0 tools: Make functions static which should not be exported.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-15 15:03:58 +01:00
Keir Fraser 461990971f tools: replace sprintf with snprintf where applicable
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-12 15:41:15 +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 2f3f6d2092 Fix xend startup after 16344:0ebac857649591.
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
2007-11-08 16:27:03 +00:00
Keir Fraser 5ac841d232 xend: Allow for non-existent xen-python-path binary.
On Solaris, xen-python-path is unnecessary.

Signed-off-by: John Levon <john.levon@sun.com>
2007-11-08 15:32:14 +00:00
Keir Fraser e02df44279 xenstored: Recover from corrupt tdb on reboot
Xen cannot work when xenstored's tdb is corrupt.  When that happens
somehow (and we've seen it happen), even reboot doesn't recover from
it.  It could: there is no state in tdb that needs to be persisted
across reboots.

This patch arranges that tdb is removed before xenstored is started,
provided it doesn't already run.  This is safe, because:

* xenstored cannot be restarted.  If it dies, Xen's screwed until
  reboot.

* /usr/sbin/xend always starts xenstored anyway.

* xenstored locks its pid-file (see write_pidfile() in
  tools/xenstore/xenstored_core.c), and refuses to start when it
  can't.

* My patch makes /usr/sbin/xend remove tdb iff it can lock the
  pid-file.  In other words, it removes tdb only when xenstored is not
  running, and locks it out until it is done.

  Bonus fix: it also removes stale copies of the tdb xenstored tends
  to leave behind when it exits uncleanly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-11-06 09:40:44 +00:00
Keir Fraser ad2485afd0 xenperf: Fix typo in mlock() invocation.
Signed-off-by: Stephen Wilson <stephen.wilson@amd.com>
2007-10-31 16:21:18 +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
kfraser@localhost.localdomain d89af62954 Xen Security Modules: Tools.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
2007-08-31 11:37:20 +01:00
kfraser@localhost.localdomain d40dbdf39f tools: Adjust tools' path calculation.
I'm suggesting this change to make another tiny step towards the
ability to run the tools e.g. out of the build tree (so that multiple
different Xen versions can co-exist without the requirement to
re-install the respective version with each boot).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-06-20 17:07:15 +01:00
Ian Campbell fe4fa7d7f7 Remove a few stray references to the sparse tree.
The only non-obvious change here is in tools/xenfb/Makefile. This now picks up
the headers it requires via the copy in tools/libxc.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-06-04 12:47:53 +01:00
kfraser@localhost.localdomain a616484850 xend: Add site-packages into Python search path
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
2007-05-24 15:30:05 +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
Ewan Mellor b31df5785d Added SXP pretty-printer.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-02-27 13:58:40 +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
Tim Deegan 7f39243d68 [PYGRUB] Plumb bootloader I/O through xenconsole.
- xend forwards console traffic between the running bootloader and a pty
   which it writes to the store so the xenconsole client can see it.
 - the xenconsole client handles the domain's console pty changing.
 - xm create no longer runs the bootloader.
 - pygrub gets '-i' option to explicitly request an interactive session.
 - xend unlocks the domain list during bootloading so that "xm console"
   can see the domain and attach to its console pty.

Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-22 11:49:14 +00:00
Ewan Mellor d529c3d93b Added rudimentary "xend reload" functionality. This allows you to reconfigure
the services offered by Xend, without restarting the daemon itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:37:53 +00:00
kfraser@localhost.localdomain 9f941deb84 [TOOLS] Provide common LFS CFLAGS/LDFLAGS additions in Rules.mk.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-17 09:54:48 +00:00
kfraser@localhost.localdomain b0e1696ee0 [XENPERF] Pretty-print hypercall stats.
From: Yoshihiko Yaegashi <y.yaegashi@jp.fujitsu.com>
From: Ken Hironaka <kenny@logos.ic.i.u-tokyo.ac.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-14 11:55:58 +00:00
kfraser@localhost.localdomain a3fc4d842e [SOLARIS] Don't mlock() hypercall buffers.
On solaris mlock requires a page aligned address and mlock doesn't
ensure the pages won't minor page fault.

Signed-off-by: Mark Johnson <mark.johnson@sun.com>
2006-10-23 09:52:51 +01:00
kfraser@localhost.localdomain 22241b17fe [SOLARIS] Xen daemons are managed separately, so we need a way to start
just xend, and we need to disable xend's self-restarter.

Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:52:17 +01: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
kaf24@localhost.localdomain 09635b3848 [TOOLS] Fixes to miniterm serial terminal utility.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-09 23:34:00 +01:00
kaf24@firebug.cl.cam.ac.uk ff858e5b2f [MBOOTPACK] Fix building mbootpack on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 12:08:08 +01:00
kaf24@localhost.localdomain b643712258 [XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly.  This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-28 13:05:00 +01:00
kfraser@localhost.localdomain 1df421476a Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
    hardware platform (e.g., MTRR access, microcode update, platform
    quirks, ...)
 2. domctl -- used by management tools to control a specified domain
 3. sysctl -- used by management tools for system-wide actions

Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).

From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-25 18:39:10 +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
tdeegan@york.uk.xensource.com 49f7c7364e Replace shadow pagetable code with shadow2. 2006-08-16 17:02:35 +01:00
kaf24@firebug.cl.cam.ac.uk a6e8b7effa Change DOM0_PERFCCONTROL: remove array limit.
Descriptors and values are passed by two distinct buffers.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-07 15:53:06 +01:00
vhanquez@gwig.uk.xensource.com 04f6e36b47 remove '=' between command line name/argument.
ease parsing without getopt.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-08-03 13:44:05 +00:00
kfraser@localhost.localdomain c407ff43f4 [TOOLS] lomount: Fix printf formats inside #ifdef DEBUG.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-02 10:13:30 +01:00
kaf24@firebug.cl.cam.ac.uk 6af68a0b67 lomount: Major rewrite: handle large files and GPT partition.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-14 13:53:59 +01:00
jchesterfield@dhcp92.uk.xensource.com 0da81aa1d4 Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README. 2006-07-13 10:13:26 +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
emellor@leeni.uk.xensource.com c1124c5993 Use the auxbin module to find the appropriate install directory for our Python
scripts.

This fixes a bug with xm-test not working on 64-bit systems.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-05 18:36:12 +01:00
kaf24@firebug.cl.cam.ac.uk ba4a95bee1 In some cases, say for instance for some bizzare reason
the tree was checked out of CVS, which doens't neccessarily
store file permissions, mkbuildtree may not be executable.
So run them explicitly via bash.

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-13 11:24:00 +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 3ba36f3595 Fix build error with -Wstrict-prototype.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-14 15:36:40 +01:00