[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 15/27] tools/libxl: Migration v2 stream format



On Mon, 2015-06-15 at 14:44 +0100, Andrew Cooper wrote:
> From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> 
> C structures describing the Libxl migration v2 stream format

Do we think these should be internal or are they part of the library
API? I suppose it's a bit of a grey area, obviously the file format is
"ABI", but its not one a user should ever interact with directly.

What I'm getting at is may most of this should be in the libxl__ rather
than libxl_ namespace (also some of it being un-namespaced would further
suggest these are strictly speaking install, as would the fact it isn't
installed...)

> Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
>  tools/libxl/libxl_sr_stream_format.h |   57 
> ++++++++++++++++++++++++++++++++++
>  1 file changed, 57 insertions(+)
>  create mode 100644 tools/libxl/libxl_sr_stream_format.h
> 
> diff --git a/tools/libxl/libxl_sr_stream_format.h 
> b/tools/libxl/libxl_sr_stream_format.h
> new file mode 100644
> index 0000000..487f9e2
> --- /dev/null
> +++ b/tools/libxl/libxl_sr_stream_format.h
> @@ -0,0 +1,57 @@
> +#ifndef LIBXL_SR_STREAM_FORMAT_H
> +#define LIBXL_SR_STREAM_FORMAT_H
> +
> +/*
> + * C structures for the Migration v2 stream format.
> + * See docs/specs/libxl-migration-stream.pandoc
> + */
> +
> +#include <stdint.h>
> +
> +typedef struct libxl_sr_hdr
> +{
> +    uint64_t ident;
> +    uint32_t version;
> +    uint32_t options;
> +} libxl_sr_hdr;
> +
> +#define RESTORE_STREAM_IDENT         0x4c6962786c466d74UL
> +#define RESTORE_STREAM_VERSION       0x00000002U
> +
> +#define RESTORE_OPT_BIG_ENDIAN       (1 << 0)
> +#define RESTORE_OPT_LEGACY           (1 << 1)
> +
> +
> +typedef struct libxl_sr_rec_hdr
> +{
> +    uint32_t type;
> +    uint32_t length;
> +} libxl_sr_rec_hdr;
> +
> +/* All records must be aligned up to an 8 octet boundary */
> +#define REC_ALIGN_ORDER              3U
> +
> +#define REC_TYPE_END                 0x00000000U
> +#define REC_TYPE_LIBXC_CONTEXT       0x00000001U
> +#define REC_TYPE_XENSTORE_DATA       0x00000002U
> +#define REC_TYPE_EMULATOR_CONTEXT    0x00000003U
> +
> +typedef struct libxl_sr_emulator_hdr
> +{
> +    uint32_t id;
> +    uint32_t index;
> +} libxl_sr_emulator_hdr;
> +
> +#define EMULATOR_UNKNOWN             0x00000000U
> +#define EMULATOR_QEMU_TRADITIONAL    0x00000001U
> +#define EMULATOR_QEMU_UPSTREAM       0x00000002U
> +
> +#endif /* LIBXL_SR_STREAM_FORMAT_H */
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.