nox-xen#
Warning. This is a work-in-progress experimental fork of the MirageOS Xen stack -- mirage-net-xen, mirage-block-xen, shared-memory-ring and mirage-xen. Do not use it in production; use those libraries instead.
The Xen paravirtual platform and drivers for the mirage-eio Eio backend.
Most of it is imported from the MirageOS Xen libraries (ISC, (c) the MirageOS
authors) and adapted to the Eio backend:
Xen.Ring-- the split-ring request/response protocol, from mirage/shared-memory-ring.Xen.Ring.Rpcis I/O-free overCstruct, so the frontend and backend sides compose in a host loopback and against a real Xen backend domain unchanged.Xen.Net/Xen.Netfront-- the network frontend, from mirage/mirage-net-xen.Xen.Block/Xen.Blkfront-- the block frontend, from mirage/mirage-block-xen.Xen.Grant,Xen.Evtchn,Xen.ClockandXen.Platform-- grant tables, event channels and the wall clock, from mirage/mirage-xen.
Xen.Xenstore and Xen.Xenbus are the two clean-room modules. Rather than
depend on the existing OCaml implementations, they are written from the Xen
protocol specifications the house way: the wire framing decoded over the
wire codec and the protocol itself a pure state machine, with the ring or
socket I/O left to a thin adapter. That structure is the point -- the clients
are I/O-free, so they are tested without a live ring and reused unchanged over
a host loopback and against a real Xen peer.
Xen.Xenstore is a client for the XenStore key/value protocol a frontend and
backend rendezvous over (ring-grant reference, event-channel port, device
state): the xs_wire.h message framing over wire and a pure request/reply
state machine. The original OCaml XenStore is
mirage/ocaml-xenstore by Thomas
Gazagnaire and Vincent Hanquez (Citrix; see the OXenstored ICFP 2009 paper),
which is LGPL-2.1.
Xen.Xenbus drives the device-connection handshake (the XenbusState enum of
io/xenbus.h) the same way -- a pure state machine with a thin adapter -- so
the same logic serves a xenstore rendezvous (a normal Xen domU) and a static
dom0less one.
Installation#
Install with opam:
$ opam install nox-xen
If opam cannot find the package, it may not yet be released in the public
opam-repository. Add the overlay repository, then install it:
$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install nox-xen
License#
ISC, matching the upstream MirageOS libraries. See LICENSE.md.
The clean-room Xen.Xenstore and Xen.Xenbus modules are ISC, (c) Thomas
Gazagnaire.