Commit Graph
7300 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 167d80d0f2 Fix 64-bit compile of pygrub. From Charles Duffy. 2005-10-11 10:03:54 +01:00
kaf24@firebug.cl.cam.ac.uk 57a851d3a6 Fix the legacy %-build targets for dist installation of
guest kernels.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-11 10:01:23 +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
kaf24@firebug.cl.cam.ac.uk c6934f25c7 Fix changeset banner for source tarballs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-10 21:45:31 +01:00
kaf24@firebug.cl.cam.ac.uk 6c85226944 Local repo version number in Xen boot log.
Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-10-10 21:08:16 +01:00
kaf24@firebug.cl.cam.ac.uk 69f01037a4 Kernel makefiles do not define $(LN).
Signed-off-by: Rik van Riel <riel@redhat.com>
2005-10-10 20:56:46 +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 bcdb352075 When a domain is introduced to xenstored, check whether this has already
happened, and only return EINVAL if the event channel details have changed.
This allows Xend to introduce domains when it starts without having to be
concerned about whether xenstored has restarted at the same time.  This
behaviour used to be subsumed by the bind_interdomain semantics for existing
channels, but in the simplification of that interface, the check must now move
to userspace.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 19:04:03 +01:00
emellor@ewan 99bc4ba13a Mention -s option in usage.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 18:59:57 +01:00
emellor@ewan 27d7a34194 Fix completely broken xenstore_read function.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 18:58:46 +01:00
kaf24@firebug.cl.cam.ac.uk ca59410b89 Fix cancellation of pending watch events on watch unregistration.
Use wait_event_interruptible() so that our kernel threads spend
their time in the more acceptable 'S' state rather than the more
worrying 'D' state.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-10 18:16:03 +01:00
kaf24@firebug.cl.cam.ac.uk 4aff323032 Fire watch callbacks on their own workqueue. Mainly this is
to make debugging easier (it's hard if an error takes out
the default workqueue!). Also, watch callbacks can be
arbitrarily long-lived, so it's more polite.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-10 16:57:41 +01:00
emellor@ewan 529d4f018e Merged. 2005-10-10 16:16:41 +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 bddd41366d xenstored now supports multiple concurrent transactions per
connection, plus interleaving of transactional and
non-transactional accesses. A transaction identifier is added
to the xsd_sockmsg header structure (0 means 'not in context
of a transaction'). The user and kernel xs interfaces accept
a pointer to a transaction handle where appropriate --
currently this is directly cast to an integer identifier in
the client library / kernel driver, but will allow for keeping
extra dynamic client-side state in future if we need to.

The transaction mutex has now gone. It's replaced with a
read-write mutex, but this is only acquired for exclusive
access during suspend/resume, to ensure there are no in-progress
transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-10 15:38:01 +01:00
emellor@ewan 5910d2c460 Merged. 2005-10-10 14:46:53 +01:00
emellor@ewan 56a738f7ff Added error logging to the block hotplug script, and support facilities for
that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 14:42:38 +01:00
kaf24@firebug.cl.cam.ac.uk 4d423f9a65 No need to gate xenstored reading requests from a
connection on whether there are pending replies/watches.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-10 11:37:10 +01:00
kaf24@firebug.cl.cam.ac.uk 5fec4cf766 Simplify reply logic in xenstored. Maintain a linked list
of pending replies that are sent out in order.

Currently we only read new requests when the reply list is
empty. In fact there is no good reason for this restriction.
Another interesting point is that (on my test machine)
hotplug blk setup fails if xenstored_client connects to
xenstored via the unix domain socket rather than through the
kernel --- this points to some user/kernel races that are
'fixed' by the extra serialisation of the in-kernel mutexes.
It definitely needs looking into.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 23:53:03 +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
smh22@firebug.cl.cam.ac.uk f2b39d8ae1 Added some clarifying comments regarding xenbus/xenstore kernel startup.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-10-09 20:55:53 +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
vh249@kneesaa.uk.xensource.com b1f64c5b90 Don't increment mi->usage is alloc_major_info return NULL
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-10-09 12:29:24 -04:00
smh22@firebug.cl.cam.ac.uk 211e84b39a Fix cpu hotplug issue with SMP guests (including save/restore).
Was a nasty one - worth ensuring we cast to u64 whenever playing 
with Xen time values. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-10-09 16:26:08 +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
emellor@ewan 9d12287d14 /home/emellor/log2 2005-10-09 12:14:46 +01:00
emellor@ewan e156cce3a4 Remove cruft.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:59:37 +01:00
emellor@ewan 9c04557e2d Remove code seeding RNG from /dev/urandom. The random module's default RNG is
already seeded from the clock, so this is unnecessary, non-portable, and
expensive.  This should improve start-up time of Xend.  Replace twisty maze of
code with something sensible.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:57:24 +01:00
emellor@ewan e92ad65f02 Append a newline to error messages, so that they are parsed by XendCheckpoint.py
correctly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:53:34 +01:00
emellor@ewan 01921f8046 Change xenbus callbacks to match new signature of xenbus_watch.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:52:24 +01:00
kaf24@firebug.cl.cam.ac.uk 7429d6e032 Make libxenstore thread-safe. It also spawns an internal
thread to read messages from the comms channel.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-08 19:19:27 +01:00
kaf24@firebug.cl.cam.ac.uk 47f583a947 Fix locking in /dev/xen/evtchn ioctl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-08 10:22:01 +01:00
kaf24@firebug.cl.cam.ac.uk eb9505d3ec Add one more parameter to __vmread_vcpu and clean some code.
Signed-off-by: Xin Xiaohui <Xiaohui.xin@intel.com>
Signed-off-by: Li Chengyuan <Chengyuan.li@intel.com>
Signed-off-by: Nakajima Jun <jun.nakajima@intel.com>
2005-10-08 09:54:06 +01:00
kaf24@firebug.cl.cam.ac.uk e34356e6b3 Add a bzImage target for xen kernels for consistency with
native architectures.

Signed-off-by: Rik van Riel <riel@redhat.com>
2005-10-08 09:51:43 +01:00
kaf24@firebug.cl.cam.ac.uk 7aecdc2e7a Xen-friendly glibc selection: appropriate ld-linux can parse
the vsyscall page ELF notes and use the "nosegneg" glibc variant
to ensure that things work fine.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
2005-10-08 09:49:28 +01:00
kaf24@firebug.cl.cam.ac.uk 1660169e32 Remove linux-2.4 sparse tree.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 23:36:26 +01:00
kaf24@firebug.cl.cam.ac.uk 7951aaa23a Some cleanup in TPM-related files and implementation of functionality that
got lost when switching to xenbus.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-07 23:22:35 +01:00
kaf24@firebug.cl.cam.ac.uk 635fd50b51 Re-enable the pygrub build and fix the build with older
e2fsprogs (tested on RHEL4 with e2fsprogs-1.35 and rawhide
with e2fsprogs-1.38)

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 23:21:23 +01:00
kaf24@firebug.cl.cam.ac.uk 3bd6068aae Move mmio operation structure from domain to vcpu.
Also do some cleanup.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Nakajima Jun <nakajima.jun@intel.com>
2005-10-07 23:17:24 +01:00
kaf24@firebug.cl.cam.ac.uk 5b013ee256 Rationalise xenstore header files a little. xenstored.h,
which defines aspects of the 'wire' protocol between
xs daemon and clients in user and kernel land, is now
xs_wire.h and moved to xen's public/io directory. From there
it is more easily accessible by kernels.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 16:49:29 +01:00
kaf24@firebug.cl.cam.ac.uk 79133a09fb Update kernel watch API to pass the array of watch arguments to the callback
instead of just passing the node.

This allows us to extend watches to have additional arguments (like domids).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-07 15:52:43 +01:00
kaf24@firebug.cl.cam.ac.uk 76bd51c23d Change xs_read_watch interface to return a sized array (in userspace and in
kernel).

Add index macros (XS_WATCH_*) for accessing the array to allow for future
expansion.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-07 15:51:53 +01:00
kaf24@firebug.cl.cam.ac.uk 86a5b732c1 Clean up file vmx.c:
1) change d to v.
 2) remove trailing spaces.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-07 15:49:33 +01:00
kaf24@firebug.cl.cam.ac.uk 726081b63b Add installation of the udev rules if appropriate. With a normal 'make
install', the udev rules will be installed if udev version is >= 059;
otherwise, the hotplug rules get installed.

When 'make dist' is done, we set a variable so that both hotplug and
udev rules are installed into the dist tarball.  install.sh then takes
care of picking the proper rules.

Also changes the hotplug check to look for a proper udev version

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 14:47:45 +01:00
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