Commit Graph
1208 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk e85a40dd36 Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:02:14 +01:00
emellor@leeni.uk.xensource.com a1190ad2e6 Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:07:11 +01:00
emellor@leeni.uk.xensource.com ac6e05c769 Added uuid unit test.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 18:01:14 +01:00
emellor@leeni.uk.xensource.com 1e6d1e90a2 Fix call to getVCpuCount for dom0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-18 17:45:50 +01:00
kaf24@firebug.cl.cam.ac.uk 0fd482ecd5 There are only six fields in vcpuinfo.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-10-18 10:53:30 +01:00
emellor@leeni.uk.xensource.com fe453929d3 Put back the arg_check calls removed recently -- they aren't as useless as I
thought they were.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 20:34:10 +01:00
emellor@leeni.uk.xensource.com 6f4faa61b2 More removal of BE_DOMAIN flags. 2005-10-17 16:33:27 +01:00
emellor@leeni.uk.xensource.com ce4bbfbf11 Merged. 2005-10-17 16:23:26 +01:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk dc66fe31f3 Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:54:28 +01:00
kaf24@firebug.cl.cam.ac.uk 3afe806f6f Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:15:17 +01:00
emellor@leeni.uk.xensource.com 238ca03bd4 Replace xm vcpu-enable and xm vcpu-disable with one command, xm set-vcpus,
which sets the number of active CPUs.  Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.

Added a server command to get VCPU information, and use this info to fix
xm vcpu-list.  That xm command now has extra information, too.  CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'.  Individual CPU time is
now available. 

Deprecated xm list -v.  -v is conventionally used for --verbose, so using it
to list vcpus is confusing.  Furthermore, we already have an equivalent command
xm vcpu-list.

Tidied up the horrendous xm list / xm vcpu-list code.

Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.

Move the dom0_enforce_vcpus code into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 14:07:47 +01:00
emellor@leeni.uk.xensource.com 37964af428 Added a TRACE log level, for those versions of Python that do not have it, and
moved XendDomainInfo.update's debugging onto that level, as it has become
overly verbose.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 13:50:28 +01:00
kaf24@firebug.cl.cam.ac.uk 981d9b117d Plumb GETVCPUINFO dom0_op through to Python. Remove
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).

TODO: Remove 'vcpus' entry in getdomaininfo Python
      dictionary.

TODO: Don't represent 'cpumap' as a bitmap in Python.
      It would be more sensible to represent as a list
      of integer CPU numbers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 11:36:36 +01:00
kaf24@firebug.cl.cam.ac.uk 349d3745d3 In addition to setting opaque handle during domain
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 16:01:11 +01:00
kaf24@firebug.cl.cam.ac.uk 30ce2a9295 Store an opaque handle (tools uuid) in the domain structure
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 15:40:48 +01:00
emellor@leeni.uk.xensource.com 86d80f8f02 Patch for typo causing multiple output in xm list -l, courtesy of Laura Ramirez
<laura.ramirez@hp.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 23:16:03 +01:00
emellor@leeni.uk.xensource.com 62164352c8 Revert accidental commit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:55:15 +01:00
emellor@leeni.uk.xensource.com 0617a2049d Merged. 2005-10-13 17:51:35 +01:00
emellor@leeni.uk.xensource.com 7e6a2a3288 Remove the diagnostic/recovery when two domains end up with the same name. It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:49:56 +01:00
emellor@leeni.uk.xensource.com 633d294bb5 Merge. 2005-10-13 15:26:44 +01:00
emellor@leeni.uk.xensource.com 043da08cae Fix broken test for zombies.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 15:25:42 +01:00
kaf24@firebug.cl.cam.ac.uk 8abc2d5b4e Fix multi-cpu save/restore after the max_vcpu patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 15:19:29 +01:00
kaf24@firebug.cl.cam.ac.uk 98adab9284 Add a option for enabling ne2000 NIC device model
Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-10-12 17:04:11 +01:00
kaf24@firebug.cl.cam.ac.uk 523636b3b7 New dom0_op to set max vcpus for a domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 16:34:49 +01:00
emellor@ewan 3e500e67eb Make the error reporting back to xm just a little bit less insane, and fix a
missing import inside blkif.  Fix the command parsing for op_device_destroy and
op_device_configure -- the device IDs should be strings, to allow the user to
specify devices by name as well as number.

This is the second half to the fixes for bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:13:32 +01:00
emellor@ewan 5ca91af2f8 Ignore any watches that fire for which we do not have a registration. This can
happen if there are watches in flight at the same time as a deregistration, and
also seems to happen spuriously on xend restart.

This fixes the Invalid token error that has been seen on xend restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:00:55 +01:00
emellor@ewan 0041d06c95 Don't try and call DevController if we can't destroy a device ourselves,
because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers.  Fixes bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:56:52 +01:00
emellor@ewan c74a06ff24 Improve error message. 2005-10-12 12:54:43 +01:00
emellor@ewan db778d68dd Explicitly state which architectures are going to use /usr/lib64, to allow for
the fact that Itanium does not.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:04:45 +01:00
emellor@ewan bd0321055f Added missing __init__.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 11:51:52 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
emellor@ewan e2c103e485 Fix deadlock in XendDomainInfo when a domain is cleaned up. We are renaming
the domain, to make it clear that it is a zombie, but this renaming cannot
check the uniqueness of the new name, because this causes a deadlock with
XendDomain.  Instead, we allow the name to be non-unique for the case of
zombie domains.

Change the locking in waitForShutdown and state_set to be robust in the face of
exceptions.

Rename the STATE_VM_ constants to STATE_DOM_.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:11:35 +01:00
emellor@ewan 9887530801 Change import that was confusing pylint (this is a pylint bug, I think).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:08:01 +01:00
emellor@ewan 2543c86b2a Issue diagnostics if xm is being run as a non-root user. This used to happen,
but the triggering error has moved, so the diagnostics were broken.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:07:04 +01:00
djm@kirby.fc.hp.com e57d870ddd Merged 2005-10-11 16:57:44 -06:00
emellor@ewan 2d15771b61 Bring out the common console-handling code from main.py and create.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 15:01:43 +01:00
emellor@ewan 562df47667 Added auxbin module, for handling auxillary binaries.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:59:52 +01:00
emellor@ewan ed7f93c25b Remove bang path.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:57:28 +01:00
emellor@ewan af1b5637f4 Allow parallel 32- and 64-bit Xen installations. Move xc_save, xc_restore,
and xenconsole out of /usr/libexec/xen and into one of /usr/lib/xen/bin or
/usr/lib64/xen/bin.  Remove all the PATH hacking inside Xend, and rely upon
the PATH being set correctly from outside.  Added an auxbin module for
handling the hacky stuff.

Replace the few /usr/bin/python bang paths with /usr/bin/env python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:55:12 +01:00
emellor@ewan 72e4987ea3 Added missing global statement, to ensure that the logfilename variable is
updated.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:33:31 +01:00
emellor@ewan 9a60ba6eb8 Fix broken xm commands.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:32:03 +01:00
emellor@ewan a499c2d2dd Added doccomment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:30:13 +01:00
emellor@ewan 5119e92a73 Fix for "unsubscriptable object" error, courtesy of Kurt Garloff
<garloff@suse.de> -- missing comma in op_mem_target_set.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 00:03:00 +01:00
emellor@ewan d0c7f9b2ad This patch fixes an error in the xm create path when the
xc.domain_create call fails (eg, when ACM policy prevents creation of a
domain).  When xc.domain_create fails, dompath never gets set.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
2005-10-10 19:06:14 +01:00
emellor@ewan dc988367d8 Rewritten XendLogging to not be a singleton class, and not have methods used
from nowhere at all.

Log to a temporary file if permission is denied to log to /var/log/xend.log,
as happens when you are not root.  Fixes bug #305.

Remove all the log-related garbage from XendRoot -- just about every module
was going straight to XendLogging.log already, so there was no need to have
XendRoot replicate this functionality.

Remove XendRoot.event_handler, which hasn't been in use since the EventServer
was removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 16:15:48 +01:00
kaf24@firebug.cl.cam.ac.uk 25517fd2f2 Extend xenbus/xenstore client interface to include a transaction
handle on appropriate operations. Next step is to plug this
through to the store daemon and get rid of the nasty serialisation
mutex for transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 21:29:10 +01:00
kaf24@firebug.cl.cam.ac.uk 4657d174ab Refactor xenbus to break up the xenbus_lock and permit watches
to fire concurrently with request/reply pairs. Remove
watch_ack message: no longer needed.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 18:52:54 +01:00
emellor@ewan a513eb7d88 Alter logging statements to move the interpolation inside the logging function,
meaning that it will only occur if the message is to be logged.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 12:20:12 +01:00
emellor@ewan 94f779dfb1 Remove unnecessary extraction of ssidref from config inside restore -- this
is now handled by the construct call, which restore has recently started using.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 12:16:23 +01:00