Commit Graph
7255 Commits
Author SHA1 Message Date
emellor@ewan 7dc4ee7c76 Merged. 2005-10-07 13:34:45 +01:00
emellor@ewan a87cea82c0 Regig the construction of new domains so that restore and create can share the
construct method.  This ensures that the domain will have any stale paths in
the store removed on restore.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 13:34:10 +01:00
kaf24@firebug.cl.cam.ac.uk e3430966b8 Add udev rules that map similar to the hotplug agent. Based off of what
Chris Bainbridge posted the end of last week but doing things as
directly as possible.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:15:52 +01:00
kaf24@firebug.cl.cam.ac.uk 44e73911fe Move the block-phy and block-file handling into a common
block script that gets called by the hotplug agent.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:13:58 +01:00
kaf24@firebug.cl.cam.ac.uk 6f455ecab6 The hotplug agent sets the path now, but that's not as practical to do
with udev rules.  So instead, make sure that the path is set in the vif
scripts themselves.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 13:11:41 +01:00
kaf24@firebug.cl.cam.ac.uk 5bd7984820 Remove bind_evtchn_to_irq/unbind_evtchn_from_irq from the
evtchn kernel interface. Fix error path in bind_evtchn_to_irqhandler.
Fix backend drivers to avoid double freeing IRQs.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 11:54:38 +01:00
kaf24@firebug.cl.cam.ac.uk e8c790c70c The attached fixes a few things to make the blkfront and netfront
drivers better follow the Linux driver model.  Changes include:
* Rename xenbus_register functions to more closely match what's used
with other buses.  Adjust callers
* There's no need to wait for the first vbd of vif and do a timeout if
they fail, device probing is async
* Add sysfs attributes for examining type and nodename
* Set device of gendisk so /sys/block/foo/device points to the right
place
* Set device of net_device so that /sys/class/net/foo/device points to
the right place

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 11:16:28 +01:00
kaf24@firebug.cl.cam.ac.uk f89856186c merge. 2005-10-07 11:04:41 +01:00
kaf24@firebug.cl.cam.ac.uk 8d840be9ee This patch copies the NAT scripts in tools/examples/ to
/etc/xen/scripts/.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-07 11:03:56 +01:00
emellor@ewan 6623c6da78 Merge. 2005-10-07 11:02:09 +01:00
emellor@ewan c1a792dbf3 Merge. 2005-10-07 11:01:23 +01:00
kaf24@firebug.cl.cam.ac.uk 88e2b02038 Move construct_vmcs to arch_vmx_do_launch.
Currently, since VMX guest is brought up by xen0, construct_vmcs is
executed in xen0 hypervisor context, this is not reasonable.  This=20
patch moves construct_vmcs to arch_vmx_do_launch.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
2005-10-07 11:00:56 +01:00
emellor@ewan 1c7d85f77f Rename the source domain on migration, regardless of the live flag. This fixes
localhost non-live migration, and bug #297.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 10:58:41 +01:00
kaf24@firebug.cl.cam.ac.uk f16cb294c5 Big simplification of the Xen event-channel interface.
EVTCHNOP_bind_interdomain in particular is much simpler.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 10:57:13 +01:00
emellor@ewan 57e576dc3c Fix conflicting merge.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 00:21:00 +01:00
emellor@ewan 2a3e2af26c Merged. 2005-10-06 19:43:11 +01:00
emellor@ewan fa670bf40e Remove xm commands block-refresh and vbd-refresh, as these are unsupported.
Allow xm block-detach to take a device name as well as a device ID.  This
closes bug #285 and fixes xm-test's 01_block-destroy_btblock_pos.py and
02_block-destroy_rtblock_pos.py.

Rename and reconnect XendDomainInfo.configureDevice to reconfigureDevice.
There is nothing using this at the moment, mind you.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 19:41:29 +01:00
kaf24@firebug.cl.cam.ac.uk 07a233ac7c User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 17:02:38 +01:00
kaf24@firebug.cl.cam.ac.uk c804adf4b6 Change how event channels are allocated and used by the control
tools. /dev/xen/evtchn is now used by daemons to connect to
remote domains: the advantage is that the local ports are garbage
collected automatically if the daemon dies. xen no longer
constructs end-to-end event-channel port pairs -- it allocates an
unbound port in new domU and writes that port to xenstore. It is
then picked up by teh appropriate daemon which does interdomain bind
via /dev/xen/evtchn.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 16:07:52 +01:00
emellor@ewan 0c6f366280 Added Zope's test.py, and a unit test to sxp. This test itself isn't very
exciting, but it's there to encourage the creation of more interesting ones.  A
test target has been added to the main Makefile, and the one in tools/python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 15:12:31 +01:00
emellor@ewan 705f86977c Merged. 2005-10-06 11:12:55 +01:00
emellor@ewan 10956b7739 Allow shutdown code SHUTDOWN_HALT, which we handle here in exactly the same
way as POWEROFF.  The tools use the distinction when the code is returned.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 11:11:16 +01:00
emellor@ewan 0465a697d3 Rename all dying domains to be prefixed with Zombie. This allows a new domain
to be created with the same name, fixing the race condition inside XendDomain
that caused bug #278.

Move the state_set(TERMINATED) call onto the end of cleanupDomain rather than
destroyDomain, so that this flag is set when XendDomain cleans up a domain
that was killed without going through Xend.

Remove is_terminated, as this check is no longer necessary, since we are using
Zombie prefixes instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 11:09:14 +01:00
emellor@ewan 435cc5366c Reduce the log level for the 'cannot recreate information for dying domain'
message for all but the first refresh when Xend starts.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 11:04:49 +01:00
kaf24@firebug.cl.cam.ac.uk e926a10696 Ensure that all fields of evtchn_op_t are initialised when
making an event_channel_op hypercall. Stefan Berger gets the
credit for diagnosing nasty domU driver problems that were a
result of garbage fields.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 10:42:32 +01:00
emellor@ewan 6bee43e0b6 Issue diagnostic if we find dying domains on Xend restart, because we will not
be able to show them any longer, as the paths in the store have gone.  Don't
call cleanupVm when a domain dies, as localhost-migrating VMs will be blown
away by this (there is actually a race between the saving process and the
resuming process).  This fixes bug #276.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 10:16:50 +01:00
emellor@ewan 4c78f9561d Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception.  Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 10:13:11 +01:00
vh249@kneesaa.uk.xensource.com 993adabd00 mixup in vcpu-enable and vcpu-disable help string
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-10-05 19:16:29 -04:00
kaf24@firebug.cl.cam.ac.uk ec7c322ccd Reformat the pfn_info structure to ensure that
lock cmpxchg8b instructions occur only on naturally
aligned 8-byte memory values. This is needed for some
NUMA x86 systems.

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Aravindh Puthiyaparambil <first.last@unisys.com>
2005-10-05 23:47:09 +01:00
kaf24@firebug.cl.cam.ac.uk c436ce043d Activate suspending/resuming of the TPM interface and add
some missing code to tpmif.py.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-05 23:15:00 +01:00
kaf24@firebug.cl.cam.ac.uk 66041d1b9c Gentoo compatible stuff has to be done *before* the set -e. You could also do
the which in the if with a combination of ! and || after the set -e but I think
it's cleaner to just do it before the set -e.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-05 19:15:56 +01:00
kaf24@firebug.cl.cam.ac.uk 0f742e92ea EVTCHNOP_alloc_unbound can allocate a port in an arbitrary
domain (only if the caller is sufficiently privileged).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 19:14:13 +01:00
emellor@ewan a00e0c297c Fix the handling of VCPUs, specifically wrt the broken VCPU hotplugging, bug
#280.  The cpu/<id>/availability paths had moved into /vm, but that is not
easily accessible by the hotplugging driver, so I have created a /vm entry
called vcpu_avail, so that the setting migrates along with the domain, and
moved the cpu/<id> ones back to /local/domain.

Don't try and destroy the domain twice if it fails within construct.  This
wasn't harming anything, but there's no need.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-05 18:06:42 +01:00
emellor@ewan d4d9c86a25 Change boolean config option parsing to allow True and Y and similar useful
things.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-05 17:48:36 +01:00
kaf24@firebug.cl.cam.ac.uk 66c12e28e9 Fix save/restore -- too much work being done in
interrupts-off context.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 17:07:01 +01:00
kaf24@firebug.cl.cam.ac.uk e127ae5952 Emulate guest reads of CR4, masking features that Xen
does not export to guests.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 16:54:09 +01:00
kaf24@firebug.cl.cam.ac.uk 4a4ad39633 Send event-channel notification from console daemon
to guest console driver when the output ring is
emptied. This can be used to kick transmission of
more characters without needing to poll.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 16:32:07 +01:00
kaf24@firebug.cl.cam.ac.uk a93d14138b Revert changes checked in by mistake in previous changeset. 2005-10-05 15:15:50 +01:00
kaf24@firebug.cl.cam.ac.uk d56d69a032 Clean up DESTDIR handling. Default install is to root
directory (/). This is only overridden automatically
for the 'make dist' targets and their legacy aliases
(make {xen,tools,kernels,docs}).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 15:05:38 +01:00
emellor@ewan 878fc540a0 Merge (with trepidation). 2005-10-05 14:40:35 +01:00
emellor@ewan 293dfc0ac2 Recover from name uniqueness violation by renaming. Fixes bug #277.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-05 14:38:19 +01:00
kaf24@firebug.cl.cam.ac.uk 5b6b39d3e9 Add Gentoo handling to network-bridge. Based on patches
from Jon Mason and Anthony Liguori.
2005-10-05 14:14:04 +01:00
kaf24@firebug.cl.cam.ac.uk 792c98fdf6 Handle the case where there are no spaces or parameters
after the image name on the command line.

Signed-off-by: Mike Day <mdday@us.ibm.com>
2005-10-05 14:10:49 +01:00
kaf24@firebug.cl.cam.ac.uk 8101af5465 Fix DOM0_PHYSINFO to return correct value for total
system memory.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 14:06:23 +01:00
kaf24@firebug.cl.cam.ac.uk 3d8296adbb Currently, the scripts in /etc/xen/scripts won't get overwritten if they
exist which means that changes can easily not get updated.  This makes
it so the scripts always get installed.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-05 13:54:36 +01:00
kaf24@firebug.cl.cam.ac.uk 862b6e6464 The attached patch places an updated TPM driver into the sparse directory.
This driver allows to build a Xen0 kernel with TPM front- and backend 
support and use it as a user domain kernel - something that is not 
possible to do with the current TPM driver in the 2.6.12 kernel. Once this 
driver appears in similar form in the kernel, I will remove it from the 
sparse directory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Leendert van Doorn <leendert@watson.ibm.com>
2005-10-05 13:52:18 +01:00
kaf24@firebug.cl.cam.ac.uk ee256fbc40 Restructure the makefiles used to drive builds of linux 2.6 kernels.
A common file eliminates duplication across makefiles.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
2005-10-05 13:41:59 +01:00
kaf24@firebug.cl.cam.ac.uk df150a9cb5 Move setting of configuration variables to Config.mk.
Allows for partial-tree builds to be invoked from a sub-directory.
Allow for users to include a ".config" with additional custom settings.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
2005-10-05 13:32:00 +01:00
emellor@ewan 39f62611c4 Removed the EventServer, replacing the events fired with simple logging
messages.  This closes bug #281.  Removed references to XendRoot where these
have become unnecessary either through the work above or just through time.

Renamed some parameters in event.py, to mark them as unused.  Fix a call to a
base class constructor there too.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-05 11:43:23 +01:00
emellor@ewan acbce46077 imported patch /home/emellor/block_detach.patch 2005-10-05 00:11:30 +01:00