xenlight: LIBXL_SHUTDOWN_REASON_UNKNOWN is now 255

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: update to xen 4.3

NOTE: the #define OCAML_READY lines need to be put back in!

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #42 from robhoes/master

xenlight: minor update to what is now upstream
New ocamlfind packages: xen-event{,.unix}

The old 'xenctrl' package exists as before, for backwards compatability.

The new packages contain:
  xen-event: OCaml code and 'external' references for the event channel
             interface which should be used by both Mirage kernels and
	     userspace apps
  xen-event.unix: userspace C stubs for libxc. Mirage has these built-in
             for now.

Eventually we will probably add a

  xen-event.xen (or .mirage) to contain the mirage kernel stubs for this
             interface

Note this is the beginning of a tidy-up where we will eventually remove
all the libxc bindings which aren't part of the public interface.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add Activations to xen-event.unix package

In the xen case, there's another implementation of Activations
in mirage-platform.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add new package xen-grant{,.unix}

The packages contain:

  xen-grant: common grant table/share definitions
  xen-grant.unix: C bindings to libxc

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update ChangeLog

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
eventchn: 'fd' and 'pending' are internal details of the Activations module

Move these Unix userspace specific details into the Unix userspace
specific Activations module. The xen version in mirage-platform can do
this differently.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
event: merge the OCaml implementation with Mirage

All the generation id logic for resume is here (even if it's not
necessary for Unix userspace)

All the stubs have the same name as their Mirage counterparts following
the naming convention: stub_evtchn_foo (the standard abbreviation of
"event channel" is "evtchn" not "eventchn")

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Partial commit

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
gnttab: in the userspace version, the 'handle' is just the data itself

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Incremental commit

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
grant: support both 'allocating' and 'non-allocating' interfaces

libxc always allocates buffers on our behalf, while in kernelspace
we have to manage our own buffers. This implementation supports both.

If a user sticks to the high-level functions and then links with
the correct C stubs, the result will work in both userspace and
kernelspace.

If an app needs low-level access then this will work for kernelspace
but fail at runtime with userspace (in addition to the runtime
failure for xen versions older than 4.2)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xen-grant: depends on lwt

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #43 from djs55/disaggregate

[incomplete] Share Eventchn, Gnt code with Mirage
./configure --disable-xenlight: don't try to build xenlight bindings

The xenlight bindings only work with xen-4.4ish.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #44 from djs55/xenlight-optional

./configure --disable-xenlight: don't try to build xenlight bindings
b2bmerge (trunk-ring3 to trunk) needed some help.
Merge commit '14215939b7970f153c27524f674908f937f1d2e9'

Conflicts were in these autogenerated files:
	xenlight/xenlight.ml
	xenlight/xenlight.mli
	xenlight/xenlight_stubs.c

Resolved by just taking the trunk-ring3 versions.
Latest libxl-idl from xen-unstable
update domain_restore

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>