Commit Graph
1072 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com 72af5fff3b Merged. 2005-11-18 16:32:04 +01:00
emellor@leeni.uk.xensource.com 3b7259968a Remove one further reference to network_limit_help that I missed when merging.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 16:31:50 +01:00
emellor@leeni.uk.xensource.com eaa3641b4f Merged. 2005-11-18 14:30:47 +01:00
emellor@leeni.uk.xensource.com 224611c6da Remove barbaric abuse of goto out of one nested block and into a previous one.
Remove one other -- less barbaric but still horrible -- use of goto.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 14:28:38 +01:00
emellor@leeni.uk.xensource.com 7a9a19bd5a From Ken Grant: Add per command help / make help match new man pages.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 14:04:53 +01:00
emellor@leeni.uk.xensource.com 2f7678e706 Simplify the logic of each of the functions here, removing the many bizarre
uses of goto that reduce down to return NULL in any case, breaking the common
code out for returning values based upon the success or failure of an
operation, and the common code that parses transaction and path parameters,
used by xspy_read, xspy_ls, and xspy_mkdir.  Break out also the common code
that removes a watch token from the XsHandle watches list.

Use bool rather than int for result values, where this matches the same use
by tools/xenstore/xs.c.

Added missing free in xspy_get_permissions.

Use PySequence_SetItem inside xs_watch, rather than Py_INCREF followed by
PyList_SetItem.  If there is no None entry in the watches list, the code goes
on to append to the list using PyList_Append, and that call takes its own
reference rather than stealing one like PyList_SetItem.  This means that we
were previously leaking a reference if the list was full and so PyList_Append
was necessary.

Use PySequence_SetItem rather than Py_INCREF/PyList_SetItem also where we are
using assigning Py_None into the list, for neatness.

Remove meaningless pipe from xspy_release_domain's arg_spec.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-17 20:17:50 +01:00
smh22@tempest.cl.cam.ac.uk 99e88d6dd7 Trivial fixes for 64bit and xend.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 18:03:48 +01:00
smh22@firebug.cl.cam.ac.uk 4c908cf0e3 Many fixes for save/restore and related areas for PAE in particular. Now
should be able to save/restore successfully on machines with up to 16GB 
and any size of guest. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 17:45:03 +01:00
emellor@leeni.uk.xensource.com 329d8364e0 Merged. 2005-11-16 15:50:36 +01:00
emellor@leeni.uk.xensource.com 02d6c42688 Watch for changes in the /vm section of the store, so that we update our
internal state if the store is configured by an external tool.

We react properly to changes in name and on_{reboot,poweroff,crash}.  Reacting
correctly to vcpus, vcpu_avail, memory, and maxmem will come soon (those code
aspects are already under review).  cpu_weight and bootloader to be considered.

Removed unused and semantically invalid method XendDomainInfo.setDomid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:32:56 +01:00
emellor@leeni.uk.xensource.com 8676593f36 Added an unwatch method, so that XendDomainInfo can unregister the watch from
outside the watch handler.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:27:59 +01:00
emellor@leeni.uk.xensource.com 1edf495b0f Move the registration of the @releaseDomain watch so that we avoid a watch
between the watch firing and the first call to refresh. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:27:11 +01:00
emellor@leeni.uk.xensource.com a71d394cc3 Merged. 2005-11-16 13:38:16 +01:00
jmb@artemis.home.pimb.org 698d53df47 Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of hardcoding it
Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
2005-11-16 13:34:52 +01:00
kaf24@firebug.cl.cam.ac.uk 568a59e7fc Rename XENVER_parameters to slightly more informative
XENVER_platform_parameters.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-16 12:44:12 +01:00
emellor@leeni.uk.xensource.com 3bd89f2ebf Merged. 2005-11-16 11:32:14 +01:00
emellor@leeni.uk.xensource.com cb248d6b16 The following patch removes every (hopefully) reference to network-limit.
Upon further investigation it sets Device parameters that don't exist any
longer, thus causing exceptions.  As it looks like this is completely
obsolete, and no one is actively working on it, we should just rip it out to
end the confusion.

Signed-off-by: Sean Dague <sean@dague.net>
2005-11-16 11:31:57 +01:00
emellor@leeni.uk.xensource.com 63852bee47 Make watchStart and watchMain global functions rather than classmethods,
meaning that we no longer need to prefix all the field accesses with cls.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 19:19:02 +01:00
emellor@leeni.uk.xensource.com da5f951216 Merged. 2005-11-15 19:09:30 +01:00
emellor@leeni.uk.xensource.com 5d0f388f77 Have a watch callback return 0 or 1 depending upon whether it would like to
continue to receive watches.  This means that it is not necessary to probe
around in the xswatch internals to unregister a watch.

Tidy up the hotplug watch handling, moving the nested function out to a
separate place (I don't think that this was a problem in the end, but it was
making me nervous as I was debugging the recent race condition, and I find it
clearer out of the class in any case.  Pass an integer code representing
hotplug status, once it has been parsed from the store, as there are now a few
different places we can detect failure, and it's cleaner to pass a code from
those places.

Small tidy up to XendDomain, removing the unused releaseDomain field.
2005-11-15 19:08:11 +01:00
emellor@leeni.uk.xensource.com 9773f5386e Remove the handling of TypeError inside gather. It is not thrown by int()
when given a non-convertible value, as claimed by the comment, as the exception
ValueError is thrown in that situation.  TypeError is only thrown on int(None),
which cannot actually take place in this code, because of the explicit check
for None.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 18:47:39 +01:00
emellor@leeni.uk.xensource.com 56be995b8a This patch fixes dom0 SMP vcpu hotplug. Currently, domains without
config files (e.g. dom0) don't set info['vcpus'] correctly resulting in
incorrect cpu availablity values in the store.  This prevents hotplug
from functioning.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-11-15 17:30:55 +01:00
emellor@leeni.uk.xensource.com b195c30cf4 This patch fixes a number of vcpu related issues.
1.  xm vcpu-list now shows info for all vcpus by using
    info['max_vcpu_id']+1 as end of the range to query
    vcpu_info.
2.  Add new vcpu fields, online_vcpus, max_vcpu_id to
    XendDomainInfo.sxpr()
3.  Remove filter_cpump() which isn't needed now that
    the per vcpu cpumap field is correct.
4.  Update xm/main.py to use online_vcpus as the number
    vcpus to display in list.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-11-15 17:28:05 +01:00
emellor@leeni.uk.xensource.com f1d4a077ea Fix race between xspy_read_watch and xspy_watch, by placing the watch in the
xshandle's list of watches *before* registering the watch with Xend.

Closes bug #392.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 17:22:04 +01:00
emellor@leeni.uk.xensource.com b5761b9ca6 Added line of debugging to try and catch hotplug script race.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-14 12:11:41 +01:00
emellor@leeni.uk.xensource.com f15f365867 Allocate MAC addresses using Xensource Inc's new OUI.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-14 11:06:25 +01:00
emellor@leeni.uk.xensource.com deb1c115f9 The various changes to move to using info instead of passing the config
sxpr everywhere broke the use of a boot loader for booting with.  The
attached fixes things up so that
a) use of a bootloader ==> kernel not specified in the config file
b) don't cleanup bootloader files until after the domain has booted
c) rerun bootloader on reboot

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-12 18:59:56 +01:00
emellor@leeni.uk.xensource.com 2654fdd1f6 New Xenbus driver structure, bringing an explicit state machine to the table.
This will make the drivers more robust to failure of the other end, and makes
current driver state more visible.  It also allows us to bring very similar
pieces of code from the drivers together into the xenbus driver.  This should
be the start of a fix to the problem with block and net device hotplugging,
because the code was previously confused about the difference between the
connection state of the kernel device layer, and the state of the xenbus
communication.  This confusion is addressed here.

Much of this work is influenced by Rusty Russell's skeleton driver, recently
posted to xen-devel, as that piece made suggestions as to structure and
arrangement that have been taken on board, albeit pushed down into the xenbus
layer.

A new file xenbus_client.c has been added.  This file implements the interface
between the xenbus layer and the layer specific to the driver.  Access to
lower layers is still allowed for those who do not need all the facilities of
the new driver.

xenbus_dev_error has moved from xenbus_xs.c into xenbus_client.c, and
xenbus_dev_ok has been removed, in favour of xenbus_switch_state.

DevController.py now closes down a device by writing a change to the Closing
state on the backend, to allow the frontend time to close down properly.  Its
also writes the frontend and backend details within the same transaction.

The timeout on the hotplug scripts has been cranked down from 2 minutes to 5
seconds.

The diagnose script has been updated to parse the new states.

The blktab and tpm drivers have yet to be ported to this structure.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 21:59:05 +01:00
kaf24@firebug.cl.cam.ac.uk f8e8438eef Remove unnecessary NULL checks before freeing memory blocks.
The following functions check for NULL internally:
 free, kfree, xfree, free_xenheap_page[s]

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 12:55:47 +01:00
Xiaofeng Ling 05fbb602ad This patch use same expression as vif for vmx guest but has a distinguish "type=ioemu"
just like block device.
e.g. vif=['type=ioemu, mac=01:00:00:00:00:33, bridge=xenbr0']
type=ioemu to specify for vmx NIC device.
nics=4 can specify 4 vmx NIC now.
bridge is passed to device model now.
With this patch, the error
"Error: Device 0 (vif) could not be connected."
will not happen for creating vmx guest
currently, it happens on some linux distribution.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-11-10 17:07:13 +01:00
emellor@leeni.uk.xensource.com fcec6e9143 Added missing __init__.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-09 16:40:07 +01:00
emellor@leeni.uk.xensource.com 19744cdc5f Cope with the ValueError exception that we get if you use Xend with the recent
change to parsing memory configuration against a store with entries written
by an older Xend.

Added maxmem field to list of things to be read from the store on recreate.
2005-11-09 16:08:37 +01:00
smh22@firebug.cl.cam.ac.uk b99415e527 More fixes for save/restore; use configured memory for generating sxp.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-09 13:59:53 +01:00
emellor@leeni.uk.xensource.com 7a2e27bf0c Merged. 2005-11-08 14:56:14 +01:00
emellor@leeni.uk.xensource.com 3483f006f3 Fix two leaks in the pyxc interface. The dictionaries are being added
to lists, and an extra ref was being left behind.

Signed-off-by: Sean Perry <sean@xensource.com>
Signed-off-by: Robert Read <robert@xensource.com>
2005-11-08 14:53:27 +01:00
Michael.Fetterman@cl.cam.ac.uk 11f72f4ab9 merge 2005-11-08 14:41:25 +01:00
Michael.Fetterman@cl.cam.ac.uk c02e0c7355 merge 2005-11-08 13:30:05 +01:00
emellor@leeni.uk.xensource.com c0c4bfbea8 Merged. 2005-11-08 12:31:43 +01:00
kaf24@firebug.cl.cam.ac.uk e1734495d8 After move randomMac to netif in 7637, we need to this for vmx guest.
otherwise, if no mac address configured, vmx guest can not be created.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-11-08 12:16:37 +01:00
kaf24@firebug.cl.cam.ac.uk 65ab7fb0d4 merge 2005-11-08 11:44:48 +01:00
emellor@leeni.uk.xensource.com 882949f3f5 Remove unused parameter.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 11:35:25 +01:00
mafetter@seana.research.intel-research.net 2fc4655033 Fix vncviewer spawning so it actually works.
How did this ever work for other people?
2005-11-08 11:31:16 +01:00
emellor@leeni.uk.xensource.com e10bc057a5 Push the process of waiting for devices to come up right out of DevController,
and drive this process from xm create.  Architecturally, this separates the
process of domain creation from the process of waiting for devices, allowing
tools to choose when to perform that wait (if at all).  This places the waiting
in the same category as the unpause after domain creation, architecturally.

The main advantage to this approach is that it takes waiting for devices out
of the scope of XendDomain's domains_lock.  When restarting a domain, the
watch would fire for @releaseDomain while we were waiting for new domains to
come up.  This would deadlock the watch thread, as no more new watches could
be delivered.  Closes bug #387.

In the longer term, we expect to be able to wait for devices to come up
completely, not simply to wait for the hotplug scripts to run, and so it is
necessary then to move the waiting procedure right out of the server, so that
it can be performed after the domain unpause.  Without unpausing the domain,
the frontends will not come up, and so we cannot detect successful device
completion.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 03:34:23 +01:00
emellor@leeni.uk.xensource.com c311699be9 Rearrange restart logic so that a failure to restart a domain does not cause
cascading secondary errors.  Fixes bug #384.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 03:07:57 +01:00
emellor@leeni.uk.xensource.com 44ae505717 Mark plenty of variables as unused, and remove an unused import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 02:51:34 +01:00
emellor@leeni.uk.xensource.com 2fe2ab90a2 Remove unused XENSTORED_XYZ constants.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 01:26:16 +01:00
emellor@leeni.uk.xensource.com a5ba036bad Rename parameter to avoid shadowing builtin.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-07 21:22:02 +01:00
djm@kirby.fc.hp.com c179fd9015 Merge latest xen-unstable into xen-ia64-unstable 2005-11-07 11:13:38 -06:00
jbulpin@wicket.uk.xensource.com 0e2ea3b8b4 Fixed syntax error in iopif patch.
Signed-off-by: James Bulpin <james@xensource.com>
2005-11-07 13:04:27 +01:00
emellor@leeni.uk.xensource.com ed9f6cba75 Move the randomMAC method from xm.create into server.netif. This way, it can
be shared with other command line tools, and the xm network-attach command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-07 12:36:53 +01:00