Commit Graph
2409 Commits
Author SHA1 Message Date
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
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
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
emellor@leeni.uk.xensource.com 4384b3fc70 Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:34:13 +01:00
kaf24@firebug.cl.cam.ac.uk 9329e6405d Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-23 16:51:47 +01:00
kaf24@firebug.cl.cam.ac.uk 74df472110 some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-23 11:51:15 +01:00
emellor@leeni.uk.xensource.com bacb111591 Reintroduce the changes made by changeset 7455:021324804fbd, which were
disabled by workaround 7468:17a9f111fa93.  We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-22 11:04:45 +01:00
kaf24@firebug.cl.cam.ac.uk 55179ce8a5 Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 10:33:26 +01:00
kaf24@firebug.cl.cam.ac.uk 900a11e8ed cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 08:35:03 +01:00
kaf24@firebug.cl.cam.ac.uk db65a8e335 This patch is to make xentop able to print vcpu usage for out of order
enabled vcpus in a domain. This really isn't an issue anymore with the
changes made to dom0 ops and xm/xend. 

But, I provide it because:

- Josh noticed my previous patch called getvcpuinfo twice for each vpcu,
which was completely silly.

- this patch would be useful in the remote chance that domain vpcus are
enabled out of order. 

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2005-10-22 07:37:15 +01:00
kaf24@firebug.cl.cam.ac.uk 44d95809c5 Two patches were applied to pygrub's setup.py to work around python2.2
limitations and only one is needed. Revert one of them.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
2005-10-22 07:35:36 +01:00
jrb44@plym.cl.cam.ac.uk 1bd54c9db6 Temporary workaround to xend start problem.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-21 18:51:42 +01:00
kaf24@firebug.cl.cam.ac.uk 3f450621b6 This is a follow up of PIC device model by Xiaofeng and me to move to
hypervisor using virtual weired interrupt line.  With this patch the
performance of CPU2K improves 7%, kernel kuild improves 14% and
cyclesoak improves 12%. It is quite amazing!

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
2005-10-21 18:29:26 +01:00
kaf24@firebug.cl.cam.ac.uk 7ebcb094f9 Tweak to pygrub build config detection.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-21 18:19:38 +01:00
jrb44@plym.cl.cam.ac.uk 64b6e234d2 Add biossums dependency to Makefile to avoid parallel build breakage.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-21 15:42:26 +01:00
emellor@leeni.uk.xensource.com 3896d075f8 Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 15:31:51 +01:00
emellor@leeni.uk.xensource.com a04a1a1dc7 Break proc paths out into separate include file, rather than inlining them.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 13:30:31 +01:00
emellor@leeni.uk.xensource.com b625626aa7 Merged. 2005-10-21 12:07:14 +01:00
emellor@leeni.uk.xensource.com e5edf96441 Break common network code in xen-network-common.sh, and common vif hotplugging
code into vif-common.sh.

Fix the antispoofing in network-bridge to allow forwarding from physical
device to bridge, and vif0.0 to eth0.

Change the interface between netback driver and vif hotplugging scripts.  The
mac address and bridge details are read from the store directly by the script,
so that the kernel driver does not need to get involved.

Remove an awful lot of cruft from vif-bridge.  Move the iptables handling into
vif-common.sh, and fix it so that the new vif can get past the antispoofing
entries.  Merge vif-nat and vif-route into this structure too.

Use ip instead of ifconfig to get necessary details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:06:17 +01:00
emellor@leeni.uk.xensource.com fb22028e11 Tidy xend-config.sxp, removing entries that haven't been used since the
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump).  Remove vif-antispoof, as Vifctl no longer passes this option
down.

Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:04:30 +01:00
emellor@leeni.uk.xensource.com 3a2351fdda Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:22:48 +01:00
emellor@leeni.uk.xensource.com aec60dc083 Remove unused Vifctl.vifctl and Vifctl.set_vif_name. Remove the bridge and
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside.  Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.

Remove XendRoot.get_vif_antispoof, matching change above.

Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:21:05 +01:00
emellor@leeni.uk.xensource.com 174e923813 Output the Xen changeset in the logs at start of day.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:08:48 +01:00
kaf24@firebug.cl.cam.ac.uk 35658f8da5 Update one file from qemu 0.71 for Cirrus Logic VGA device model.
Using the older device model running pinball game on windows with
full screen can cause guest crash.

Signed-off-by: yunhong.jiang@intel.com
2005-10-21 10:24:35 +01:00
kaf24@firebug.cl.cam.ac.uk 9f202a0633 Send special keys that your graphical user interface intercepts at
low level, such as ctrl-alt-del in X Window.

Adds a command "sendkey" to deal with it in the monitor, you
can send keys to the vm. Use - to press several keys simultaneously.
Example:
sendkey ctrl-alt-f1

Signed-off-by:      Dan Xu <dan.d.xu@intel.com>
Signed-off-by:      Zhai, Edwin <edwin.zhai@intel.com>
Signed-off-by:      Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-21 10:20:38 +01:00
kaf24@firebug.cl.cam.ac.uk 5aa6b4306e Turn off some debug switches by default
These macros cause extra prints in /var/log/xend-debug, and
affect the performance.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-21 10:17:29 +01:00
kaf24@firebug.cl.cam.ac.uk cc677c9d4e This patch to the Xen access control module (ACM) and tools:
1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized 
domains to retrieve policy decisions regarding the sharing of resources 
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such 
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in 
domain 0; currently there is no enforcement in Dom0 and all packets flow 
freely
   *  the security policy in block device backends to control which 
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision 
ACM interface call, it is in tools/security/get_decision.c and will be 
compiled together with the policy tools. As usual, the ACM is unconfigured 
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>
2005-10-20 21:37:15 +01:00
jrb44@plym.cl.cam.ac.uk d52306f795 Avoid specifying bogus DISPLAY=None when spawning device model.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-20 19:37:41 +01:00
emellor@leeni.uk.xensource.com e08da109cd Set antispoof default to yes, as this seems safer, and is the current behaviour
in VifCtl.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-20 14:06:07 +01:00