mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libxl: Migration v2 stream format
C structures describing the Libxl migration v2 stream format Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> --- v2: Move into libxl__ namespace
This commit is contained in:
1 parent
74a7c7a928
commit
d3ea965258
1 file changed
+57
@@ -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 (1u << 0)
|
||||
#define RESTORE_OPT_LEGACY (1u << 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:
|
||||
*/
|
||||