Contents

1 Introduction

hsXenCtrl is the Haskell bindings to Xen Control[1] (see <xenctrl.h> if you have the xenctrl-devel package installed).

The darcs repository is available from the repository [2] and on hackage [3].

2 Current Status

Most of xenctrl.h has c bindings made for it in the System.Xen.CBindings module. The API is subject to change as new types gradually replace primitives (such as CInt all over). In most cases there exists a Storable instance for the Haskalized structures; one notable exception is MMUExtOp (mmuext_op_t) which has unions and thus would need extra context for a proper peek operation.

3 Design

The first stage of development is making System.Xen.CBindings, in which an FFI binding is made to all C routines in xenctrl.h and supporting data structures are translated into Haskell. Little to no logic is intended to be implemented in this module - it should give uninhibited access to the xen primitives.

A higher level module, System.Xen, will be made that provides most the basic operations in a simpler manner. The need to call xc_handle_[open,close] will be in the plumbing along with any need for XCHandle. Also, the errors (typically returned CInt values) will be reexpressed using 'Either XenError a' or by throwing exceptions (the library will pick a single method).

4 Suggested Projects Using hsXenCtrl

The most obvious doors opened are Haskell rewrites of the current Xen
infrastructure (virt-install, xm, xend). Slightly more interesting tasks could be (warning: random thoughts):