Commit Graph
2436 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 2442eccf6d Sanitise the trace-buffer hypervisor<->user interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-31 10:45:31 +01:00
kaf24@firebug.cl.cam.ac.uk f6556b0d17 This is a set of changes which allow the tracebuffer functionality to
be enabled and disabled dynamically while the system is running. The
existing DOM0_TBUFCONTROL hypercall is used, and three new operations
have been added: enable, disable, and set_size. This is to address
concerns that use of the trace buffers impacts system performance.

The initial value of opt_tbuf_size is set to zero, so that trace
buffers remain disabled by default. They can be enabled as they used
to be, by adding tbuf_size= to the xen command line at boot time. They
can also be turned on and off any time when the system is running. The
size of the trace buffer allocation can also be changed dynamically
while the system is running. The trace buffers may be completely
deallocated by setting the size to zero. No change in buffer size can
be done while tracing is enabled;

Other Changes made:
 - Update the constants in tools/xentrace/formats to match those in 
public/trace.h
 - libxc functions for enable/disable, get/set size
Still left to do:
 - remove all ifdef's for trace buffers and the 'trace' build option
 - xm command to do enable/disable trace buffers and get/set size
 
Signed-off-by: Rob Gardner  <rob.gardner@hp.com>
2005-10-30 22:31:45 +01:00
emellor@leeni.uk.xensource.com 07237aa4f3 Merged. 2005-10-30 19:23:36 +01:00
emellor@leeni.uk.xensource.com 6bcc179281 Added doccomment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 17:19:35 +01:00
kaf24@firebug.cl.cam.ac.uk 0bc575ba3a This patch is to fix the NIC driven mechanism to make it event
driven. We will also send it to Qemu mailing list.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
2005-10-30 16:47:59 +01:00
emellor@leeni.uk.xensource.com 1df0c600a7 Added network-attach and network-detach. Fixes bug #300.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:44:47 +01:00
emellor@leeni.uk.xensource.com b67a7e6305 Force the devid given to destroyDevice to an integer. This means that that
method copes with the values given to xm network-detach without netif.py having
to intervene. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:43:52 +01:00
emellor@leeni.uk.xensource.com 302aa2f721 Added -lpthread to qemu-dm link line, in order to compile even without SDL
installed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:35:06 +01:00
emellor@leeni.uk.xensource.com ff9465e411 Merged. 2005-10-30 14:00:35 +01:00
emellor@leeni.uk.xensource.com 77e1fe3493 Change the interface between XendRoot.get_network_script and Vifctl so that a
list is passed rather than a single string.  This expands the config-file
interface so that parameters may be passed to the network scripts from the
config file.

Fix XendRoot._logError (missing asterisk before args parameter).

In XendRoot, allow an empty configuration file.  This makes it easier to unit
test code reliant on XendRoot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:48:34 +01:00
emellor@leeni.uk.xensource.com d2e3b493ab Don't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
no bridge parameter and let the vif-bridge script find one for itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:45:06 +01:00
emellor@leeni.uk.xensource.com 466acdeb47 Added test_create.py, a test script for create.py. This contains a unit test
for the command line parsing code in xm create.  To make it easier to test,
create.py has changed in structure around the main(argv) function, adding a new
parseCommandLine function.

Remove a large number of useless parameters, where the opts structure was being
passed all over the place, just to eventually log through it.  Instead two
methods -- err and warn -- have been broken out from the Opts class, and there
is now no need to pass the opts value everywhere.

Change the parsing inside make_config to remove lots of cut-and-pasted cruft.

Change the documentation to the vif command to indicate that the bridge can be
auto-detected.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:42:30 +01:00
emellor@leeni.uk.xensource.com 480d7883b5 Added xen.xm.tests package to build.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:34:12 +01:00
emellor@leeni.uk.xensource.com af374bc7d2 Added xen-script-common.sh, for functions common to all scripts, not just the
hotplug ones.  Added evalVariables and findCommand functions to that, which we
use to clarify the handling of variables being passed in as command line
variables.

Make vif-bridge able to find the bridge for itself if only one bridge is in
use.  This means that it is not necessary to specify a bridge in many
configurations.  Allow the bridge to be specified on the command line, meaning
that a default may be provided in the xend-config.sxp if desired.

Added xenstore_read_default to xen-hotplug-common.sh, which reads from the
store but uses a given default if the path in the store is not present.  This
is used by vif-bridge to allow the store details (i.e. those given to xm create)
to override the default value given in the xend-config.sxp.

Remove vif-bridge setting -- the value can be specified on the vif-script
command line if necessary.

Added examples for network-nat/vif-nat.

Added lots of big comments.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:33:17 +01:00
emellor@leeni.uk.xensource.com 896ca6d77a Free domain names in xenstat_free_node, fixing small memory leak.
Thanks to Anthony Liguori for spotting the leak.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:23:21 +01:00
kaf24@firebug.cl.cam.ac.uk 1464591d5f merge 2005-10-29 09:51:35 +01:00
jbulpin@wicket.uk.xensource.com adeed21529 Prevent event listener socket from being inherited by children.
This was passing down to dhclient which was keeping the 8001 port
open and preventing xend restarting.

Also fixed a case typo in setCloExec

Signed-off-by: James Bulpin <james@xensource.com>
2005-10-29 01:58:00 +01:00
emellor@leeni.uk.xensource.com 8c48c9e2ad Fix reboot logic. An indentation error meant that every second reboot would
be refused, with the domain being destroyed instead.

Further fix for reboot logic when using on_reboot=rename-restart: the incorrect
node was being removed once restart has completed, leaving Xend to conclude
later that it had crashed in the middle of a restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-28 13:02:06 +01:00
kaf24@firebug.cl.cam.ac.uk 7429bfd50d This patch provide local APIC support for vmx guest.
A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-10-28 09:48:46 +01:00
kaf24@firebug.cl.cam.ac.uk a3cdca7914 xm help notes that domid can be used in place of domname.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2005-10-27 18:22:45 +01:00
kaf24@firebug.cl.cam.ac.uk 8fa033460a To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
2005-10-27 17:47:53 +01:00
kaf24@firebug.cl.cam.ac.uk ac266cafda Originally in qemu when a IDE dma transfer is started which is triggered
by access to 0xc000 port in VMX, qemu will blocked there until it
finished. And during that block, there are extra dom switches between
dom0 and idle domain, and VMX can't be resumed. By making real IDE dma
tranfer run in another thread, qemu will return and VMX resume on time
and there are fewer cycle wasted.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2005-10-27 17:29:39 +01:00
kaf24@firebug.cl.cam.ac.uk a7da7a4ecb The attached patch fixes 2 issues with the scripts written for the Xen
access control module and makes the tools more self-explanatory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-27 17:27:04 +01:00
kaf24@firebug.cl.cam.ac.uk 41ae27972e Remove all binaries on make clean. 2005-10-27 17:20:33 +01:00
kaf24@firebug.cl.cam.ac.uk ce57ab29ff Remove a non-portable and unused error.h, and use signal.h not
sys/signal.h (in tools/misc).
2005-10-27 17:16:48 +01:00
kaf24@firebug.cl.cam.ac.uk 9485da60b7 Use standard int typedefs.
Signed-off-by: John Levon <levon@movementarian.org>
2005-10-27 17:16:12 +01:00
emellor@leeni.uk.xensource.com f76bd5cf5e Fix Jerone Young's xenstat / xenstore patch:
Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-27 10:53:02 +01:00
jeroney@localhost.localdomain 740401a4f8 * Enable xenstat to use xenstore
* Have xentop display names instead of DomIDs
  as requested in Bugzilla#311 filed by Ian
2005-10-27 10:19:58 +01:00
emellor@leeni.uk.xensource.com 6ee89dae79 Fix the check for non-existence of the save/restore directories, by using &&
rather than -a.  The former shortcuts at the script level, whereas the latter
does not, which means that the backtick-enclosed arguments are evaluated
regardless of the success of preceding tests.

Tidy the aforementioned test into a function of its own.

Add an implementation of usleep for those systems that only have sleep (Debian,
for example).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 16:59:13 +01:00
emellor@leeni.uk.xensource.com 0edd55be19 Move exception handler for sxp.ParseError above that for Exception, as the
latter subsumes the former.  Minor tidy-ups.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:59:29 +01:00
emellor@leeni.uk.xensource.com a8a1d48e4c Break the write_dev function out from block into new block-common.sh, where it
can also be used by block-enbd and block-nbd.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:58:13 +01:00
emellor@leeni.uk.xensource.com 902a84f59f Added copyright notice.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:57:16 +01:00
emellor@leeni.uk.xensource.com b043099b44 New xendomains init script, courtesy of Kurt Garloff:
It now allows the user to configure what he wants to be done on
xendomains stop: sysrq, migrate, save, or shutdown.
For this to be safe, a timeout has been introduced (optional).
On start, saved domains may be restored, and not yet started
domains from the auto start dir will be started in addition.
status reports missing domains, restart and reload work as well.

The init script is somewhat SUSE-ish, but it should work on LSB
compliant and on RH based distros as well.

I would appreciate this to be put into tools/examples/init.d/

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-26 14:55:32 +01:00
emellor@leeni.uk.xensource.com 5c8eb3b727 Check whether dom is NULL when we handle a watch. This might occur if the
domain has recently been removed from our list, but with a watch still in
flight.  This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 13:41:00 +01:00
emellor@leeni.uk.xensource.com ccbd11acd6 Added comment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 12:06:58 +01:00
jeroney@localhost.localdomain 22d8d7060f Remove second decleration of .PHONY & cleanup formating 2005-10-25 17:37:00 +01:00
emellor@leeni.uk.xensource.com e4ba1fec3e Fix format spec for tracing.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-25 16:00:49 +01:00
emellor@leeni.uk.xensource.com 617482f058 NBD scripts, courtesy of Kurt Garloff:
For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
2005-10-25 11:52:56 +01:00
emellor@leeni.uk.xensource.com 655b6990ad Merged. 2005-10-25 11:24:01 +01:00
emellor@leeni.uk.xensource.com 1033d025c4 Moved SuSE-specific getcfg call into a preiftransfer call. The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-25 11:22:47 +01:00
djm@kirby.fc.hp.com 6a106a03b0 Oops, missed hg add of vti example file 2005-10-24 21:00:35 -06:00
djm@kirby.fc.hp.com 8620f56614 Necessary change to support ia64/vti domain build in common code.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:57:47 -06:00
djm@kirby.fc.hp.com 9f69bceba2 Image builder for ia64/vti domain, together with a example config file.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:56:53 -06:00
chris@ubuntu.eng.hq.xensource.com be8604faf3 Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-24 19:04:30 -07:00
emellor@leeni.uk.xensource.com 31ad1c62b7 Change argument spec for introduce_domain argument parsing, as the MFN is a long.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 18:24:07 +01:00
djm@kirby.fc.hp.com 8250e0c500 Merge 2005-10-24 09:08:13 -06:00
emellor@leeni.uk.xensource.com 9f8f052650 Removed some unnecessary imports.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 15:18:31 +01:00
emellor@leeni.uk.xensource.com 8b6e8053b8 Added a timestamp to the logging output by trace_io.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 14:12:42 +01:00
emellor@leeni.uk.xensource.com 493b98bf23 Do not create the console tty until domain_create_ring has succeeded. This
means that any reads attempted on that tty will not cause handle_tty_read to
segfault looking for an interface that does not exist.

Move the writing of the tty node so that it happens after console/limit has
been read, as it is cleaner if the writing is the last thing that happens.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 14:11:07 +01:00
emellor@leeni.uk.xensource.com fea7782321 Change the semantics of GetDomainPath so that it always succeeds, regardless of
whether a domain has been introduced to the store.  Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced.  This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce.  Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.

No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.

Do not write the contents of the info block to the store.  All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:45:15 +01:00