mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
In a remus scenario, libxc will write a CHECKPOINT record, then hand ownership of the fd to libxl. Libxl then writes any records required and finishes with a CHECKPOINT_END record, then hands ownership of the fd back to libxc. 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>
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
#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
|
|
#define REC_TYPE_CHECKPOINT_END 0x00000004U
|
|
|
|
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:
|
|
*/
|