[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 25/29] tools/libxl: Stream v2 format
From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> TODO: Namespacing Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/libxl/libxl_saverestore.h | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tools/libxl/libxl_saverestore.h diff --git a/tools/libxl/libxl_saverestore.h b/tools/libxl/libxl_saverestore.h new file mode 100644 index 0000000..31a22d6 --- /dev/null +++ b/tools/libxl/libxl_saverestore.h @@ -0,0 +1,47 @@ +#ifndef LIBXL_SAVERESTORE_H +#define LIBXL_SAVERESTORE_H + +#include <stdint.h> + +/* Definitions for LibXenLight Domain Image Format version 2 */ +struct restore_hdr +{ + uint64_t ident; + uint32_t version; + uint32_t options; +}; + +struct restore_rec_hdr +{ + uint32_t type; + uint32_t length; +}; + +struct restore_emulator_hdr +{ + uint32_t id; + uint32_t index; +}; + +#define REC_TYPE_END 0x00000000U +#define REC_TYPE_DOMAIN_JSON 0x00000001U +#define REC_TYPE_LIBXC_CONTEXT 0x00000002U +#define REC_TYPE_XENSTORE_DATA 0x00000003U +#define REC_TYPE_EMULATOR_CONTEXT 0x00000004U + +/* All records must be aligned up to an 8 octet boundary */ +#define REC_ALIGN_ORDER 3U + +#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) + +#define EMULATOR_UNKNOWN 0x00000000U +#define EMULATOR_QEMU_TRADITIONAL 0x00000001U +#define EMULATOR_QEMU_UPSTREAM 0x00000002U + +#define RESTORE_STREAM_IDENT 0x4c6962786c466d74UL +#define RESTORE_STREAM_VERSION 0x00000002U + +#define RESTORE_OPT_BIG_ENDIAN (1 << 0) +#define RESTORE_OPT_LEGACY (1 << 1) + +#endif -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |