Commit Graph
546 Commits
Author SHA1 Message Date
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
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 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
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
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
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 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
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
iap10@firebug.cl.cam.ac.uk 5dc12fe242 Remove unused x86_64 functions.
Signed-off-by: ian@xensource.com
2005-10-14 01:42:34 +01:00
jrb44@plym.cl.cam.ac.uk 1109d74507 Fixed 64 bit Linux build.
Fixes from Ian Pratt. extern declaration of bind_ipi was out of sync with
the definition of the function.

Signed-off-by: James Bulpin <james@xensource.com>
2005-10-13 20:16:02 +01:00
kaf24@firebug.cl.cam.ac.uk 9394398ccf Cleanup CPU hotplug and save/restore. Next step is to
simplify SMP initial boot and then should be easy to merge
i386 and x86/64 smpboot.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 17:08:59 +01:00
kaf24@firebug.cl.cam.ac.uk 349f04a5df NS_PER_TICK must be a s64 quantity. It is compared with
possibly -ve values which we do not want to 'promote' to
big +ve values.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 08:38:49 +01:00
kaf24@firebug.cl.cam.ac.uk dfc0b259c1 Add memory barriers to console ring accesses. Similar to what
Rusty uses for xenbus messaging.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 21:10:14 +01:00
cl349@firebug.cl.cam.ac.uk 4e5630275d Disable watch callbacks only during driver registration instead of all probes.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-12 20:58:51 +01:00
cl349@firebug.cl.cam.ac.uk 22abd37313 Disable watch callbacks while running the driver probe callback.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-12 18:43:26 +01:00
kaf24@firebug.cl.cam.ac.uk 3b83e00b15 Change xenstore-domain messaging protocol to match what we use
for other inter-domain comms (power-of-two-sized rings, and
free-running indexes). The interface is defined in the spirit of
the console protocol, so maybe some chance of merging them
together later?

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 18:25:40 +01:00
kaf24@firebug.cl.cam.ac.uk 5677e95f23 Keir moved barriers,
Competence questions are raised:
        Correctness withers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-10-12 17:00:29 +01:00
kaf24@firebug.cl.cam.ac.uk c7a76688b9 Fix vcpu-hotplug xenbus watch handler and setup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:47:16 +01:00
kaf24@firebug.cl.cam.ac.uk f7c1a9cd63 This patch implements select() functionality on /dev/vtpm and fixes some
other problems.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-12 09:33:03 +01:00
djm@kirby.fc.hp.com e57d870ddd Merged 2005-10-11 16:57:44 -06:00
kaf24@firebug.cl.cam.ac.uk 4cd488119e Publish the virtual console interface in public/io/console.h.
Make the ring buffers a powe-of-two in size.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-11 14:14:54 +01:00
kaf24@firebug.cl.cam.ac.uk 4ab0181e52 Fix xenbus internal join() function to be concurrency safe
(no static string buffer).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-11 11:59:15 +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
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
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
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
djm@kirby.fc.hp.com 61f98e4923 Convert a few privops to existing hyperprivops in xenlinux 2005-10-09 09:04:49 -06: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
djm@kirby.fc.hp.com 25313e76bb Still more updating ia64 to xen-unstable 2005-10-08 22:55:14 -06:00
djm@kirby.fc.hp.com ecd5eb7620 More updating ia64 to latest xen-unstable 2005-10-08 22:28:02 -06:00
djm@kirby.fc.hp.com 776ce3ec76 Update ia64 to keep up with core changes 2005-10-08 14:28:56 -06:00
djm@kirby.fc.hp.com c575162f2a Merge 2005-10-08 14:28:24 -06:00
djm@kirby.fc.hp.com 84c411d11e Add support for fast mov_to_kr privops
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-10-08 11:37:45 -06: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 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 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 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