Commit Graph
496 Commits
Author SHA1 Message Date
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 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 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 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
djm@kirby.fc.hp.com e57d870ddd Merged 2005-10-11 16:57:44 -06: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
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
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 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 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 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
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
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
kaf24@firebug.cl.cam.ac.uk 1872f40d78 Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:34:02 +01:00
kaf24@firebug.cl.cam.ac.uk 836ead33c4 Create new vcpu_op() hypercall. Replaces old boot_vcpu()
hypercall and vcpu-related schedop commands.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-03 19:14:02 +01:00
vh249@kneesaa.uk.xensource.com 3b4a8a957c remove useless ptep_establish_new function (called set_pte_at now)
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-10-02 17:45:32 -04:00
kaf24@firebug.cl.cam.ac.uk 756af00b03 Define new notify_remote_via_irq() interface which is a
safe version for drivers to use that is aware of
save/restore. Post-restore notifications are silently
dropped, in the expectation that xenbus will eventually
get round to telling the driver it needs to reconnect.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-29 15:49:54 +01:00
kaf24@firebug.cl.cam.ac.uk eb3abaa7a2 Change semantics of bind_evtchn_to_xxx and
unbind_evtchn_from_xxx. The bind now returns the IRQ
number on success. The unbind takes this as a parameter
instead of the event-channel port. Also, unbind closes
down the underlying event-channel port if it is still
live.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-29 15:14:03 +01:00
kaf24@firebug.cl.cam.ac.uk 434a7023be VIRQs and IPIs on VCPU#0 are automatically re-bound on save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-29 13:05:43 +01:00
kaf24@firebug.cl.cam.ac.uk 9eda1f79a8 Reindent more xenlinux files. Remove defunct header file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-29 11:10:27 +01:00
djm@kirby.fc.hp.com 72f6940bc6 Merge latest xen-unstable into xen-ia64-unstable 2005-09-26 11:07:49 -06:00
djm@kirby.fc.hp.com 195564107a More getting xenlinux/ia64 to build with drivers from -sparse 2005-09-23 11:15:48 -06:00
djm@kirby.fc.hp.com b407002e1b Another step towards building xenlinux/ia64 from -sparse 2005-09-23 08:12:28 -06:00
emellor@ewan bdd477ad34 Add check for speed (takes 33 minutes on my laptop, OUCH!)
Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.

Fix up transaction users for new semantics.
Don't need a transaction around a single read in xen/i386/kernel/smpboot.c.
Python: transaction_start() returns True/False rather than raising exception on EAGAIN.
Fix usage comment on xs_transaction_end().
Include stdarg to xs_tdb_dump so it compiles.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-09-23 14:28:16 +01:00
djm@kirby.fc.hp.com 58fff2a00b First step toward building drivers/xen for ia64 out of sparse 2005-09-22 18:05:29 -06:00
djm@kirby.fc.hp.com 250cccd224 Minor drivers/xen changes and includes to support xenlinux/ia64 2005-09-22 12:06:33 -06:00
djm@kirby.fc.hp.com 46d993a5ca Merge latest xen-unstable into xen-ia64-unstable 2005-09-22 11:42:01 -06:00
kaf24@firebug.cl.cam.ac.uk 81c46aedf9 A more comprehensive fix for mapping shared-ring grant
references in back-end drivers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-22 12:46:17 +01:00
djm@kirby.fc.hp.com 1be9af6e37 Another fix for handling ar.kr's 2005-09-21 14:13:07 -06:00
djm@kirby.fc.hp.com f83ba4d543 Remove paravirtualization of ar.kr registers (may need hyperprivop for
mov_to_kr later)
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-09-21 13:41:25 -06:00
kaf24@firebug.cl.cam.ac.uk fb542e5648 Fix mapping of shared ring pages into backend drivers.
This should fix observed problems when creating a domain,
causing Xen to print "Could not find PTE entry for
address ...".

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-21 16:36:46 +00:00
djm@kirby.fc.hp.com fa4a47057d Start fleshing out -sparse tree for xenlinux/ia64 2005-09-21 09:06:30 -06:00
kaf24@firebug.cl.cam.ac.uk 8b00e58770 Fix __save_flags() to not complain when smp_processor_id() is used
in a preemptible region (it is always safe).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-20 14:44:49 +00:00
kaf24@firebug.cl.cam.ac.uk 3c77932be4 Fix xenconsole when console page is >= 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-20 14:09:07 +00:00
cl349@firebug.cl.cam.ac.uk 7beef3e9e4 Fix kernel users of xs_write as well.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-19 16:02:32 +00:00
kaf24@firebug.cl.cam.ac.uk 1f730cca16 direct_remap_pfn_range() takes a vm_area_struct rather than
an mm_struct. Also it sets VM_RESERVED and VM_IO, just like
generic remap_pfn_range() in mm/memory.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-16 10:57:31 +00:00
kaf24@firebug.cl.cam.ac.uk e88fac734c Start cleaning up grant tables. gnttab_donate now called
gnttab_transfer, with slightly rationalised interface and
simpler implementation inside Xen. This is a tiny chip off
the tip of a very big iceberg. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-15 17:09:50 +00:00
kaf24@firebug.cl.cam.ac.uk 2ba4b43df9 merge? 2005-09-15 07:38:53 +00:00
kaf24@firebug.cl.cam.ac.uk e81e11f6c5 More build fixes for latest binutils. No 'movl' between
a segment register and memory location.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-15 07:21:31 +00:00
djm@kirby.fc.hp.com f84c209190 Add missing include/decl to ia64-specific hypervisor.h 2005-09-14 17:01:42 -06:00
djm@kirby.fc.hp.com fd55d8ff15 Add ia64-specific hypervisor.h 2005-09-14 15:45:30 -06:00
djm@kirby.fc.hp.com 6be63db55d Merge latest xen-unstable into xen-ia64-unstable to prep
for push back to xen-unstable
2005-09-14 15:36:10 -06:00