Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: hydrogen

Apr 16, 2013

  1. Rob Hoes

    warning

    authored March 23, 2013
  2. Rob Hoes

    libxl: ocaml: use string for uuid

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 23, 2013
  3. Rob Hoes

    libxl: ocaml: provide default records for libxl types

    Libxl functions such as libxl_domain_create_new take large structs
    of configuration parameters. Often, we would like to use the default
    values for many of these parameters.
    
    This commit makes OCaml records of defaults available for all libxl
    struct and keyed-union types, which can be used as a base to construct
    your own records, and to selectively override parameters where needed.
    
    For example, a Domain_create_info record can now be created as follows:
    
    let c_info = Xenlight.Domain_create_info.({ default with
    	ty = Xenlight.DOMAIN_TYPE_PV;
    	name = Some vm_name;
    	uuid = vm_uuid;
    }) in
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  4. Rob Hoes

    libxl: ocaml: add VM lifecycle operations

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  5. Rob Hoes

    libxl: ocaml: add disk and cdrom helper functions

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  6. Rob Hoes

    libxl: ocaml: add PCI device helper functions

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  7. Rob Hoes

    libxl: ocaml: add NIC helper functions

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  8. Rob Hoes

    libxl: ocaml: allow device operations to be called asynchronously

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  9. Rob Hoes

    libxl: ocaml: event management

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  10. Rob Hoes

    libxl: ocaml: add wrappers for poll

    We need this in order to wrap the event API of libxl.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  11. Rob Hoes

    libxl: ocaml: implement some simple tests

    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  12. Rob Hoes

    libxl: ocaml: add dominfo_list and dominfo_get

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 23, 2013
  13. Rob Hoes

    libxl: ocaml: add xen_console_read

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  14. Rob Hoes

    libxl: ocaml: add with_ctx helper function

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  15. Rob Hoes

    libxl: ocaml: use the "string option" type for IDL strings

    The libxl IDL is based on C type "char *", and therefore "strings" can
    by NULL, or be an actual string. In ocaml, it is common to encode such
    things as option types.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  16. Rob Hoes

    libxl: ocaml: fix the handling of enums in the bindings generator

    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  17. Rob Hoes

    libxl: ocaml: fix the META file

    The "xl" module was renamed to "xenlight" some time ago, but the
    META file was not updated.
    
    It also needed to be added to the list of generated files in the
    Makefile.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  18. Rob Hoes

    libxl: idl: add domain_type field to libxl_dominfo struct

    This allows a toolstack to find out whether a VM has booted as PV or HVM.
    
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  19. Rob Hoes

    libxl: ocaml: add domain_build/create_info/config and events to the b…

    …indings.
    
    We now have enoguh infrastructure in place to do this trivially.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  20. Rob Hoes

    libxl: ocaml: propagate the libxl return error code in exceptions

    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  21. Rob Hoes

    libxl: ocaml: switch all functions over to take a context.

    Since the context has a logger we can get rid of the logger built into these
    bindings and use the xentoollog bindings instead.
    
    The gc is of limited use when most things are freed with libxl_FOO_dispose,
    so get rid of that too.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  22. Rob Hoes

    libxl: ocaml: allocate a long lived libxl context.

    Rather than allocating a new context for every libxl call begin to
    switch to a model where a context is allocated by the caller and may
    then be used for multiple calls down into the library.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 24, 2013
  23. Rob Hoes

    libxc: ocaml: add simple binding for xentoollog (output only).

    These bindings allow ocaml code to receive log message via xentoollog
    but do not support injecting messages into xentoollog from ocaml.
    Receiving log messages from libx{c,l} and forwarding them to ocaml is
    the use case which is needed by the following patches.
    
    Add a simple noddy test case (tools/ocaml/test).
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  24. Rob Hoes

    libxl: ocaml: add some more builtin types.

      * bitmaps
      * string_list
      * key_value_list
      * cpuid_policy_list (left "empty" for now)
    
    None of these are used yet, so no change to the generated code.
    
    Bitmap_val requires a ctx, so leave it as an abort for now.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  25. Rob Hoes

    libxl: ocaml: support for KeyedUnion in the bindings generator.

    A KeyedUnion consists of two fields in the containing struct. First an
    enum field ("e") used as a descriminator and second a union ("u")
    containing potentially anonymous structs associated with each enum
    value.
    
    We map the anonymous structs to structs named after the descriminator
    field ("e") and the specific enum values. We then declare an ocaml
    variant type name e__union mapping each enum value to its associated
    struct.
    
    So given IDL:
    
     foo = Enumeration("foo",
    	(0, "BAR"),
    	(1, "BAZ"),
     s = Struct("s", [
            ("u", KeyedUnion(none, foo, "blargle", [
    		("bar", Struct(...xxx...)),
    		("baz", Struct(...yyy...)),
    	])),
     ])
    
    We generate C:
    
     enum { FOO, BAR } foo;
     struct s {
     	enum foo blargle;
     	union {
     		struct { ...xxx... } bar;
     		struct { ...yyy... } baz;
     	} u;
     }
    
    and map this to ocaml
    
     type foo = BAR | BAZ;
    
     module	s = Struct
    
     	type blargle_bar = ...xxx...;
    
     	type blargle_baz = ...yyy...;
    
     	type blargle__union = Bar of blargle_bar | Baz of blargle_baz;
    
     	type t =
     	{
     		blargle : blargle__union;
     	}
    
    These type names are OK because they are already within the namespace
    associated with the struct "s".
    
    If the struct assiated with bar is empty then we don't bother iwht
    blargle_bar of "of blargle_bar".
    
    No actually change in the gnerated code since we don't generated any
    KeyedUnions yet.
    
    The actual implementation was inspired by
    http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php#ref_constvrnt
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  26. Rob Hoes

    libxl: ocaml: avoid reserved words in type and field names.

    Current just s/type/ty/ and there are no such fields (yet) so no
    change to generated code.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  27. Rob Hoes

    libxl: ocaml: support for Arrays in bindings generator.

    No change in generated code because no arrays are currently generated.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  28. Rob Hoes

    libxl: ocaml: fix code intended to output comments before definitions

    I'm not sure how useful these comments actually are but erred on the
    side of fixing rather than removing.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  29. Rob Hoes

    libxl: idl: allow KeyedUnion members to be empty

    This is useful when the key enum has an "invalid" option and avoids
    the need to declare a dummy struct. Use this for domain_build_info
    resulting in the generated API changing like so:
        --- tools/libxl/_libxl_BACKUP_types.h
        +++ tools/libxl/_libxl_types.h
        @@ -377,8 +377,6 @@ typedef struct libxl_domain_build_info {
                     const char * features;
                     libxl_defbool e820_host;
                 } pv;
        -        struct {
        -        } invalid;
             } u;
         } libxl_domain_build_info;
         void libxl_domain_build_info_dispose(libxl_domain_build_info *p);
    
    + a related change to the JSON generation.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  30. Rob Hoes

    libxl: Add LIBXL_SHUTDOWN_REASON_UNKNOWN

    libxl_dominfo.shutdown_reason is valid iff (shutdown||dying). This is a bit
    annoying when generating language bindings since it needs all sorts of special
    casing. Just introduce an explicit value instead.
    
    Signed-off-by: Ian Campbell <ian.cambell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    authored March 19, 2013
  31. Rob Hoes

    imported patch libxl_domain_config.idl-fix.patch

    # HG changeset patch
    # User Rob Hoes <rob.hoes@citrix.com>
    # Date 1359496878 0
    # Node ID 5e64f08
    # Parent  4ab027a
    imported patch libxl_domain_config.idl-fix.patch
    authored March 19, 2013
  32. Rob Hoes

    libxl: move definition of libxl_domain_config into the IDL

    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    authored March 19, 2013

Apr 15, 2013

  1. tools/blktap2: Handle read/write interrupts in blktap2 control plane.

    The following patch:
    
    tools: Retry blktap2 tapdisk message on interrupt.
    
    Addressed a long standing regression with the blktap2 control
    plane.  An interruption of the select system call would
    prematurely terminate the message sequence needed to properly
    shutdown a blktap2 tapdisk instance.
    
    Ian Jackson correctly noted that the read and write systems calls
    responsible for receiving and sending the control messages could
    also return EINTR resulting in similar effects.  While this
    regression was not noted in field testing this patch adds support
    to re-start the calls to provide a technically complete
    implementation of control plane management in the presence of
    signals.
    
    Signed-off-by: Dr. Greg Wettstein <xen@wind.enjellic.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit a5c8001)
    authored March 28, 2013 Ian Jackson committed April 15, 2013
  2. libxl: don't launch more than one tapdisk process for each disk

    When adding a disk don't launch multiple tapdisk instances for the
    same disk, if transaction fails in device_disk_add reuse the same
    tapdisk for further tries instead of creating a new instance each
    time a transaction fails.
    
    Reported-by: Darren Shepherd <darren.s.shepherd@gmail.com>
    Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
    Tested-by: Darren Shepherd <darren.s.shepherd@gmail.com>
    
    Backport-requested-by: Pasi Karkkainen <pasik@iki.fi>
    (cherry picked from commit ec39866)
    Conflicts:
    	tools/libxl/libxl.c
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    authored April 15, 2013 Ian Jackson committed April 15, 2013

Apr 12, 2013

  1. Jan Beulich

    update Xen version to 4.2.2-rc2

    authored April 12, 2013
Something went wrong with that request. Please try again.