Commit Graph
2576 Commits
Author SHA1 Message Date
dan@guaranine.beaverton.ibm.com cf01e4ff3b Test for creating a domain with too little memory. 2005-11-16 20:33:12 +01:00
dan@guaranine.beaverton.ibm.com 574b65be2f Make 01_reboot test more robust.
We need to attach a console before rebooting to make sure the domain did
actually boot in the first place.  Also, use a better method for pulling out
the uptime string.
2005-11-16 20:32:36 +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 2877958e20 Merged. 2005-11-16 12:37:29 +01:00
emellor@leeni.uk.xensource.com f1f5c0ba12 Review checks for Error string when checking that bad arguments are handled
correctly.  Many checks were looking using output.find("Error") > 1, which is
incorrect, as we do not guarantee that the word "Error" will be first in the
output (never mind the fact that strings are indexed from 0).

All these checks have been changed to compare against -1.  In particular, this
should fix the failure of create_noparm_neg and create_badparm_neg on a machine
with the /etc/xen/xmdefconfig file in place, as xm create issues the
Using config file "/etc/xen/xmdefconfig" diagnostic before reporting the error.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 12:36:47 +01:00
kaf24@firebug.cl.cam.ac.uk 3d95cc36a0 Fix up start_info_t magic string to match the format of
XENVER_capabilities strings.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-16 12:23:17 +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 fd8a620f6b Merged. 2005-11-15 16:24:31 +01:00
danms@us.ibm.com 44631ace40 Reduce the time required to start xm-test domains by allowing the console
to retry connecting to the DomU multiple times.  A polling approach instead
of a wait-and-hope-it-works approach.
2005-11-15 16:07:44 +01:00
emellor@leeni.uk.xensource.com 8d43373af6 Have the vif scripts expect the offline event, not the remove event. With
the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead.  This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 15:56:47 +01:00
emellor@leeni.uk.xensource.com 946f9a1879 Added link_exists function, for neatness. Check for the existence of the pdev
before issuing the diagnostic about the missing vdev.  Having a pdev but no
vdev is a strong indicator that the network-bridge script has run once already,
and so there is nothing to worry about.  Having the vdev and no corresponding
pdev is still diagnosed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-15 15:54:51 +01:00
kaf24@firebug.cl.cam.ac.uk 0d5ddb8806 The new userland monitoring tool, XenMon.
Signed-off-by: Rob Gardner <rob.gardner@hp.com>
2005-11-15 15:09:58 +01:00
kaf24@firebug.cl.cam.ac.uk 21b4e1c2a6 Previous changeset trivially broke ioemu/helper2.c. Fix it.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-15 11:36:44 +01:00
kaf24@firebug.cl.cam.ac.uk b4c25d2787 This patch fixed keyboard issue for linux kernel 2.6 in vmx guest.
linux 2.6 kernel keyboard use a timer to poll the kbd state,in
virtualization environment,the kbd interrupt injection is very likely
to happend just after kbd state query in the kbd timer and thus 
will reverse sequence of scan code.
Also fix env->send_event SMP issue.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Edwin Zhai<edwin.zhai@intel.com>
Signed-off-by: Eddion Dong <eddie.dong@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
2005-11-15 11:34:29 +01:00
emellor@leeni.uk.xensource.com 7845e5bb11 Fix check for a working iptables installation. Checking for the iptables
binary is not sufficient, because the user may not have the appropriate
modules installed.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-14 12:28:47 +01:00
emellor@leeni.uk.xensource.com 88b3b622e7 Merged. 2005-11-14 12:12:29 +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
kaf24@firebug.cl.cam.ac.uk 26ed038491 Clean up xenstore/console shared page initialisation, which is
now handled solely by the domain builder.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:36:42 +01:00
kaf24@firebug.cl.cam.ac.uk 3947efa1c2 Revert accidentally applied changes from changeset
7783:5aad7e145e501fbfb346954950a33b042a963633.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:35:50 +01:00
kaf24@firebug.cl.cam.ac.uk 48e6b24e8b Trivial Makefile cleanup for ioemu. 2005-11-14 11:11:11 +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
kaf24@firebug.cl.cam.ac.uk e7b975b0b6 If /sbin/ isn't in the path, udev rules will erroneously not get
installed.

Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
2005-11-14 11:05:34 +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
dan@guaranine.beaverton.ibm.com 47bb754959 This test was failing for he wrong reason. Calls to block-attach after the
first *should* report failure, so the test should not fail because of this.
The test now fails because multiple calls to block-attach seem to detach the
block devicem, which is wrong.

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-11-12 18:25:12 +01:00
emellor@leeni.uk.xensource.com 8fc503a014 Disable use of mmap. This allows Xenstored to run with an NFS-mounted
/var/lib/xenstored.  Closes bug #400.  This fix no doubt has a performance hit,
so I have opened bug #401 to discuss a better fix.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-12 17:51:14 +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
emellor@leeni.uk.xensource.com c0efb8dc85 Rename the commands inside the hotplug scripts to match those used by hotplug
and udev.  Pass all commands through from xen-backend.agent or
xen-backend.rules rather than second-guessing the individual scripts.  This
should make it easier to tear down devices cleanly, especially the dangling
vifs we are seeing at the moment.

Cope with a missing type node inside the block script, as we don't want to
resurrect a removed node by writing a hotplug error message.

Log failure of iptables command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 18:01:44 +01:00
emellor@leeni.uk.xensource.com 53ce8b9dd9 Don't call iptables if it is not installed. This code is only there to ensure
that packets between domU and the bridge are not firewalled, so if iptables is
not installed, then there is no worry.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 17:56:02 +01:00
emellor@leeni.uk.xensource.com aea7cae133 Fix function call syntax in vif-route and vif-nat.
Function calls in shell script should not contain parenthesis.

Signed-off-by: Murillo Fernandes Bernardes <mfb@br.ibm.com>
2005-11-11 17:04:17 +01:00
emellor@leeni.uk.xensource.com 5919178679 Merged. 2005-11-11 15:36:16 +01:00
emellor@leeni.uk.xensource.com 7c8b72ea79 Chmod a+x. 2005-11-11 15:36:07 +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
kaf24@firebug.cl.cam.ac.uk 5aa99be215 Merge with xen-unstable-ia64.hg 2005-11-11 10:47:43 +01:00
kaf24@firebug.cl.cam.ac.uk ea475aded3 nloopbacks default is now 8. So vifnum of greater than 7 requires
an adjustment to nloopbacks. Warning comment updated.

Signed-off-by: Nivedita Singhvi (niv@us.ibm.com)
2005-11-11 10:46:36 +01:00
kaf24@firebug.cl.cam.ac.uk 41317fc7d5 Remove unnecessary ifdef in defn of xprintk. Install
xenguest.h.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
2005-11-11 10:39:20 +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 67b5c8dbca Removed autogenerated file.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-10 16:59:51 +01:00
emellor@leeni.uk.xensource.com a22a20e2bb Fix the log reopening by moving the code with all the races out of the signal
handler and into the main loop.  The "self-pipe trick" is used to awaken the
select() call on SIGHUP.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-10 16:20:27 +01:00
djm@kirby.fc.hp.com 093551c035 Merge latest xen-unstable into xen-ia64-unstable 2005-11-10 08:34:09 -06:00
kaf24@firebug.cl.cam.ac.uk 6c48136bc4 Add some minor defensive coding/error handling in xc_vmx_build.c like
C/S 7687

Signed-off-by: Haifeng Xue <haifeng.xue@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-11-10 12:06:50 +01:00