Commit Graph
7429 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com f3adfa9dcb Set the console limit for DomUs based on a value set in xend-config.sxp.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:37:16 +01:00
emellor@leeni.uk.xensource.com c8a1f1c7fc Some trivial changes for the tool scripts:
- make xen-hotplug-common.sh (un)set locales.
 - use xen-hotplug-common.sh in vif-bridge.

From Gerd Knorr <kraxel@suse.de>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:34:44 +01:00
emellor@leeni.uk.xensource.com db6435aaa8 Added sedf_get functionality to XendClient interface. From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:33:22 +01:00
emellor@leeni.uk.xensource.com 963785e3ee Remove unused parameter from addControllerClass. This became unused when the
BE_DOMAIN flags were removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:53:00 +01:00
emellor@leeni.uk.xensource.com 6d55f51603 Remove unused shadow_control functionality from the Python layer. This is
handled in xc_linux_save, and no-one in the Python layer uses this functionality
directly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:51:25 +01:00
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk 4bdaa2c588 Rename 2.6.12.5 patch so it actually gets applied. Fail
the build if 'patch' is missing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-19 07:43:03 +01:00
kaf24@firebug.cl.cam.ac.uk 5e91bc5c8a Fix -xen builds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:28:16 +01:00
kaf24@firebug.cl.cam.ac.uk 1a7490299e Domain0 doesn't do initial VCPU hotplug via xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:07:03 +01:00
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 0a105191a0 Merge i386/x86_64 smpboot.c into a simplified common Xen version.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 17:40:31 +01:00
kaf24@firebug.cl.cam.ac.uk 5cf031e58d alloc_netif() must return a ERR_PTR() on error, not NULL.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 15:40:29 +01:00
kaf24@firebug.cl.cam.ac.uk 422ad78b3c Clean up some VMX IO handler code:
1. Clean up some definitions.
2. change d to v, if it means vcpu.
3. remove some tailing spaces.

TODO:
split current VMX IO handler list to 2, one for port IO,
and the other for MMIO.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-18 11:09:36 +01:00
kaf24@firebug.cl.cam.ac.uk f2fabb9e4e Fix x86_64 smp boot:
The local_setup_timer prototype was bad. The call from start
secondary() to it was calling with out the CPU parameter. Eventually the
CPU parameter received by the local_setup_timer is bogus (big negative
number). With such a big cpu number the per_cpu macro was trying to
access totally wrong memory location (per cpu data offset for big -ve no
cpu) causing the unhandled page fault. Because the dom0 was panicking
the error information on the serial console was also not going through,
giving just clueless hang.  With hyper call based debug statement I
could find out what was going wrong in the dom0.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2005-10-18 11:07:55 +01:00
kaf24@firebug.cl.cam.ac.uk 3a44cc2613 Allow interdomain channels to bind DOMID_SELF to DOMID_SELF.
Signed-off-by: Steve King <steven.r.king@intel.com>
2005-10-18 11:04:48 +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
kaf24@firebug.cl.cam.ac.uk 7126177413 In the shadow mode, thanks to recent patches, the shadow
reference counts (both general counts and type counts)
are now correct in all of my testing so far.  As a result,
we should remove the shadow_tainted_refcnt flag from
the domain structure.  Leaving this flag in place would
create confusion for programmers and would also prevent
future debugging of problems in handling general and type
reference counts in the shadow mode.  In addition, the
patch also (1) drops the requirement that shadow_mode_disable()
should only be called in the domain destruction sequence
(even though it is only used that way so far), and
(2) strictly assert that the type reference count must
be 0 when we free a page from the dom heap.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
2005-10-18 10:45:29 +01:00
cl349@firebug.cl.cam.ac.uk 006b46b2d0 Fix transaction EAGAIN handling in xenstore client programs.
Redirect all output to a buffer and only print the buffer once the
transaction succeeds, discarding output from previous attempts.
In particular, fixes failures when the (block) backend driver would
not configure because reads from the hotplug script did get double
output when a transaction had to be redone.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-18 02:08:26 +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 dcd2f1cf1f Merged. 2005-10-17 14:12:20 +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
kaf24@firebug.cl.cam.ac.uk 689c39e019 Force RTC driver to fail to load in domU by preventing it
from binding to IRQ8.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 14:02:36 +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 ec82f54895 Clean up debug tracing in mm and mm audit code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 17:25:15 +01:00
kaf24@firebug.cl.cam.ac.uk e21acec89d Small cleanup in hotplug script.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 12:34:37 +01:00
kaf24@firebug.cl.cam.ac.uk 8ac022c344 Fix local_irq_save() and irqs_disabled() to be preemption-safe.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 11:45:51 +01:00
kaf24@firebug.cl.cam.ac.uk ed80a0a187 Flush writable pagetable state whenever a domain is
synchronously paused (by Xen or by domain0), or when
it shuts down.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 17:19:43 +01:00
kaf24@firebug.cl.cam.ac.uk 70a2469320 Fix invalidation of shadow LDT on SMP systems.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:26:03 +01:00
kaf24@firebug.cl.cam.ac.uk 918a5c1de8 Remove bogus error message in libxenctrl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:25:29 +01:00
kaf24@firebug.cl.cam.ac.uk 1fbda75445 Detect failure to create shutdown process and retry twice
per second until it succeeds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 16:25:05 +01:00
emellor@leeni.uk.xensource.com da1385d8e8 Use new -t flag on xenstore-rm to keep the store pruned when devices go away.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:56:07 +01:00
emellor@leeni.uk.xensource.com 86234f86b5 Fix installation decision to make the DISTDIR and DESTDIR absolute before
comparing them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:55:03 +01:00
emellor@leeni.uk.xensource.com 9f7fae040f Added --tidy flag to xenstore-rm that recursively removes any empty directories
left by the primary removal.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-15 12:52:38 +01:00
kaf24@firebug.cl.cam.ac.uk a9634a6106 At least for the time being, GETVCPUCONTEXT needs to work
even for uninitialised VCPUs. xc_linux_build() depends on
it (rather stupidly).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 09:32:10 +01:00
kaf24@firebug.cl.cam.ac.uk 5519fdc24a Extend VCPUINFO dom0_op to return status information about
run state of the VCPU. VCPUCONTEXT returns info about
hotplugged VCPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-15 08:52:22 +01:00
kaf24@firebug.cl.cam.ac.uk 0044805a73 Fix NAT for domU checksum offload.
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2005-10-15 08:33:19 +01:00
kaf24@firebug.cl.cam.ac.uk b606206a63 add BT instruction support to VMX MMIO decoder.
Also extends TEST and OR instructions support for 16/32 bit operations,
these are needed for windows.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
2005-10-15 07:43:08 +01:00
iap10@freefall.cl.cam.ac.uk 6a5cdc1492 Enable hotplug cpus in -xen x86_32 kernel.
Suggested by Ryan Harper
Signed-off-by: ian@xensource.com
2005-10-15 00:20:35 +01:00
kaf24@firebug.cl.cam.ac.uk 37df894164 machine_specific_memory_setup() makes the following call to setup e820:
add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);

Since max_pfn is (rightly) an unsigned long, we overflow for the current
definition of PFN_PHYS. Attached is my preferred solution as it will
hopefully avoid similar situations that may come up in the future.

Signed-off-by: srparish@us.ibm.com
2005-10-14 22:15:21 +01:00
kaf24@firebug.cl.cam.ac.uk 192fc23b5a This should fix time stopped / going slow problems that
various users have been seeing.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 18:27:25 +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