Commit Graph
7066 Commits
Author SHA1 Message Date
emellor@ewan f8e5b67cfe This patch cleans up some of the argument usage in PrettyPrint.py to
avoid a stack trace when doing an 'xm list -l'.  Most of the
prettyprint() methods were called with 1 argument, but the functions
required 2 (one of which was unused).

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 15:03:00 +01:00
emellor@ewan 3a2080259e Remove DBMap etc from XendDomainInfo, moving the handling of the domain root
and VM root totally into XendDomainInfo.  The DBMap stuff was all cruft,
following the move to xstransact.  Removing it may also help those suffering
from poor start-up times caused by a large store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 14:49:31 +01:00
emellor@ewan 4ac7f7b347 Remove the domain and VM paths from the store when destroying a domain. This
goes a long way towards fixing the problem of stale entries in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 14:36:58 +01:00
emellor@ewan 4cdb221751 Merge. 2005-09-27 13:54:02 +01:00
emellor@ewan 4cafea04fa Detangle the restart/reboot/halt/save/restore code. There is now one point
for management of shutdown state, XendDomainInfo.refreshShutdown, which is
able to cope whatever the current state of the domain.  This fixes bug #124:
running reboot within a domU doesn't bring the domain back up after shutdown,
and bug #256: "xm reboot" could not make domU reboot.

Fix the refreshing inside XendDomain to ensure that the values returned by xm
list reflect reality correctly.  We were removing XendDomainInfo instances,
but not creating them on start-up, so if xend were restarted, domain
information was being lost.

Merge XendDomain.dom0_unknown and initial_refresh into
XendDomainInfo.recreate.

Catch exceptions inside callInfo, and reraise them as XendErrors.

Remove unused XendDomain.close.

Further improvements are needed to XendDomainInfo to ensure that it avoids all
race conditions on shutdown, and can cope correctly with xend restarting
during a shutdown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 13:53:06 +01:00
emellor@ewan 2585169bbb Use constant in XendDomainInfo rather than embedding a string literal.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 12:30:13 +01:00
emellor@ewan d501525831 Added missing import socket statement.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 12:29:36 +01:00
kaf24@firebug.cl.cam.ac.uk 68fd7614db Move non-transactional and non-idempotent code out of
xenstore transaction retry loops in our device drivers.
Otherwise things get very smelly if a transaction fails and
is retried.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-26 19:13:57 +01:00
kaf24@firebug.cl.cam.ac.uk 45dc6ad80a xenstore fires @releaseDomain both when a domain shuts
down and when it eventually dies. xenconsoled now only
relinquishes its handle on a domain when it dies. This
allows us to 'xm console' connect to a crashed domain,
which is very useful!

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-26 18:49:21 +01:00
kaf24@firebug.cl.cam.ac.uk f61d64c62e xenbus_transaction_end() returns negative error code.
Therefore need to test for -EAGAIN (not EAGAIN).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-26 16:31:33 +01:00
kaf24@firebug.cl.cam.ac.uk a1f3989438 Fix so that 'make uninstall' won't fail if /etc/xen
doesn't exist.
2005-09-25 11:47:22 +01:00
emellor@ewan 71d2fbe977 Add helper method XendDomain.callInfo that stubs through into XendDomainInfo.
This is used to remove much of the code duplication in the public methods there.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-24 23:10:31 +01:00
emellor@ewan 4aab1ddef6 Nothing. 2005-09-24 22:57:26 +01:00
emellor@ewan 1b324602d0 Merge. 2005-09-24 22:57:04 +01:00
emellor@ewan 6b7179401d Added default value for ssidref -- 0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-24 20:41:48 +01:00
emellor@ewan de9520f69b Move ImageHandler registration into image.py from XendDomainInfo.py. Move
ImageHandler.create and findImageHandlerClass to the module level, and inline
addImageHandlerClass.  Move ImageHandler.kernel, ramdisk, cmdline, and flags,
which seem inadvertently to have been declared as class variables, and make
them instance variables instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-24 20:36:15 +01:00
kaf24@firebug.cl.cam.ac.uk 9d1a4b6c93 Fix build for pedantic compilers. 2005-09-24 15:35:47 +01:00
kaf24@firebug.cl.cam.ac.uk 0a045970ea Fix tpm split driver to follow changes in the xenbus API.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-09-24 08:58:41 +01:00
kaf24@firebug.cl.cam.ac.uk ccaff07480 Update User's Guide installation section to mention hotplug.
Now that hotplug seems to be necessary to boot new domains (at least, to
get disk access in those domains), add a note to the installation guide
mentioning this dependency.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
2005-09-23 20:10:32 +01:00
kaf24@firebug.cl.cam.ac.uk 34a8699cc7 Add an install-time check for hotplug.
The hotplug subsystem is currently needed for block devices to work, as
of changeset 6742:e9d01c5dc7b4d6b7cda9ade0d137ddb89bb204cc.  Add a
script to check for the presence of hotplug and warn if it isn't found.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
2005-09-23 20:09:59 +01:00
kaf24@firebug.cl.cam.ac.uk 12fb0d0708 Fix debug build of Xen. 2005-09-23 17:47:48 +01:00
emellor@ewan 395b1e96a0 Removed unused Blkctl.py. The functionality here has been taken over by the
new hotplug system.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 17:17:22 +01:00
emellor@ewan b3d9dfeaf8 Merged. 2005-09-23 16:57:13 +01:00
emellor@ewan a61dbab153 Merge the duplicated code for create, destroy, migrate, sysrq, and shutdown
into one handler that dynamically imports the correct subcommand handler.
Remove the fullhelp cruft, which was referencing something not actually present,
and was unused.  Remove xm_network_attach and xm_network_detach, which were
providing code for unadvertised and unsupported functionality.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 16:56:46 +01:00
emellor@ewan 78b04c6c84 Neaten the configuration parsing code. Add a self parameter to
configureBootloading.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 16:53:57 +01:00
emellor@ewan 9b0cb01573 Move ImageHandler.create call to initDomain, after the call to xc.domain_create.
This ensures that ImageHandler has the correct domain ID available to it, which
seems sensible in general, and is necessary for the VMX VNC support in
particular.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 16:50:02 +01:00
kaf24@firebug.cl.cam.ac.uk 80137da99c Restructure GNTTABOP_map_grant_ref.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-23 16:28:17 +01:00
emellor@ewan a65b0d048f Remove unused XendDB.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 16:05:37 +01:00
emellor@ewan f43aec3cd9 Remove unused tempfile.py. Even if anyone were using it, they shouldn't be --
there's tempfile functionality in the Python standard library.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-23 16:04:43 +01:00
emellor@ewan 475b779529 Fix call with missing parameters. 2005-09-23 15:53:36 +01:00
kaf24@firebug.cl.cam.ac.uk 2404d08913 Make PAE defs in xg_private.h usable in both 32- and
64-bit builds.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-23 14:43:52 +01:00
emellor@ewan bdd477ad34 Add check for speed (takes 33 minutes on my laptop, OUCH!)
Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.

Fix up transaction users for new semantics.
Don't need a transaction around a single read in xen/i386/kernel/smpboot.c.
Python: transaction_start() returns True/False rather than raising exception on EAGAIN.
Fix usage comment on xs_transaction_end().
Include stdarg to xs_tdb_dump so it compiles.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-09-23 14:28:16 +01:00
Rusty Russell f11f68cd11 Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-09-23 14:25:01 +01:00
Rusty Russell 7c7896249b Add check for speed (takes 33 minutes on my laptop, OUCH!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-09-23 14:24:58 +01:00
kaf24@firebug.cl.cam.ac.uk 0c4708b64f Add VGA acceleration support for cirrus logic device model
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Asit Mallick  <asit.k.mallick@intel.com>
2005-09-23 13:30:54 +01:00
kaf24@firebug.cl.cam.ac.uk 2b3f9eda6b Clean up xc_vmx_build():
1. Remove linux parameters.
 2. Remove init ramdisk.
 3. Remove e820 memmap config file parse.
 4. Removed provisional GDT.
 5. Removed some ugly tailing space.

Signed-off-by: Xin B Li <xin.b.li@intel.com>
2005-09-23 12:52:43 +01:00
kaf24@firebug.cl.cam.ac.uk 01668ad066 Remove file from sparse tree. 2005-09-22 20:59:31 +01:00
djm@kirby.fc.hp.com 250cccd224 Minor drivers/xen changes and includes to support xenlinux/ia64 2005-09-22 12:06:33 -06:00
djm@kirby.fc.hp.com 46d993a5ca Merge latest xen-unstable into xen-ia64-unstable 2005-09-22 11:42:01 -06:00
djm@kirby.fc.hp.com c68a16a423 Patches and recipe to build an elilo.efi that will boot domain0 with initrd
and pre-built "xlilo.efi".  Courtesy of Anthony Xu and Fred Yang.
2005-09-22 11:34:14 -06:00
emellor@ewan 42a5d02afb Move variable initialisation out of import section. Remove obsolete save
parameter from XendDominInfo.exportToDB.
2005-09-22 18:03:16 +01:00
emellor@ewan 089412c49e Rename XendDomainInfo and DevController.getDomain to getDomid.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:58:43 +01:00
emellor@ewan 251888ee61 Move initDomain out of image.py and into XendDomainInfo. The only thing that
needed any of the state of image.py was the bootloader code, which says there,
but all the rest was doing something that belonged more properly in
XendDomainInfo, with all the other generic domain initialisation code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:52:07 +01:00
emellor@ewan 8259cb8841 Added diagnostic message when RuntimeError is raised inside XenStore.exists.
This is one of the first things to be used when xenstored starts up, so a
corrupted filesystem may manifest itself here.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 17:50:29 +01:00
emellor@ewan 3f962c0f21 Merged. 2005-09-22 16:12:14 +01:00
emellor@ewan 9f70470c55 A number of changes to get save-restore working again:
Fix the use of configuration inside domain_configure.  The config written by
XendDomainInfo.sxpr has moved, and this function needs to change to match.

Re-add a call to _add_domain inside domain_restore.

Inside XendDomainInfo.restore, perform the appropriate configuration to restore
the domain.

Validate maxmem_KiB, and cap it at memory_KiB if over that value.  Save
requires that value to be correct, as the logic for saving only the pages
in use is not in place inside Xen.

Output the device configuration in sxpr(), as required for save-restore.

Check for image being null when trying to call createDeviceModel -- configure
is called on restore as well as create, and the ImageHandler instance is not
present in the former.

Remove dead code create_blkif.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-22 16:05:44 +01:00
kaf24@firebug.cl.cam.ac.uk 29008aff6c Fixes a vtpm timeout problem for slow machines.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-09-22 15:19:30 +01:00
kaf24@firebug.cl.cam.ac.uk 936568e29a Netfront/back always use grant tables now. This cleans up a
whole bunch of code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:36:20 +01:00
kaf24@firebug.cl.cam.ac.uk 9508e60958 Remove defunct usb split driver code. It will get replaced with
a new working driver at some point.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:05:36 +01:00
kaf24@firebug.cl.cam.ac.uk f392c549ca Indentation cleanups in linux driver code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 14:04:14 +01:00