mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
docs/libxl: Introduce CHECKPOINT_END to support migration v2 remus streams
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>
This commit is contained in:
1 parent
210b481752
commit
7eaec00dd9
3 files changed
+25
-1
No files matched your search
@@ -119,7 +119,9 @@ type 0x00000000: END
|
||||
|
||||
0x00000003: EMULATOR_CONTEXT
|
||||
|
||||
0x00000004 - 0x7FFFFFFF: Reserved for future _mandatory_
|
||||
0x00000004: CHECKPOINT_END
|
||||
|
||||
0x00000005 - 0x7FFFFFFF: Reserved for future _mandatory_
|
||||
records.
|
||||
|
||||
0x80000000 - 0xFFFFFFFF: Reserved for future _optional_
|
||||
@@ -203,3 +205,13 @@ index Index of this emulator for the domain, if multiple
|
||||
|
||||
emulator_ctx Emulator context blob.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
CHECKPOINT\_END
|
||||
---------------
|
||||
|
||||
A checkpoint end record marks the end of a checkpoint in the image.
|
||||
|
||||
0 1 2 3 4 5 6 7 octet
|
||||
+-------------------------------------------------+
|
||||
|
||||
The end record contains no fields; its body_length is 0.
|
||||
@@ -35,6 +35,7 @@ typedef struct libxl__sr_rec_hdr
|
||||
#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
|
||||
{
|
||||
|
||||
@@ -36,12 +36,14 @@ REC_TYPE_end = 0x00000000
|
||||
REC_TYPE_libxc_context = 0x00000001
|
||||
REC_TYPE_xenstore_data = 0x00000002
|
||||
REC_TYPE_emulator_context = 0x00000003
|
||||
REC_TYPE_checkpoint_end = 0x00000004
|
||||
|
||||
rec_type_to_str = {
|
||||
REC_TYPE_end : "End",
|
||||
REC_TYPE_libxc_context : "Libxc context",
|
||||
REC_TYPE_xenstore_data : "Xenstore data",
|
||||
REC_TYPE_emulator_context : "Emulator context",
|
||||
REC_TYPE_checkpoint_end : "Checkpoint end",
|
||||
}
|
||||
|
||||
# emulator_context
|
||||
@@ -176,6 +178,13 @@ class VerifyLibxl(VerifyBase):
|
||||
self.info(" Index %d, type %s" % (emu_idx, emulator_id_to_str[emu_id]))
|
||||
|
||||
|
||||
def verify_record_checkpoint_end(self, content):
|
||||
""" Checkpoint end record """
|
||||
|
||||
if len(content) != 0:
|
||||
raise RecordError("Checkpoint end record with non-zero length")
|
||||
|
||||
|
||||
record_verifiers = {
|
||||
REC_TYPE_end:
|
||||
VerifyLibxl.verify_record_end,
|
||||
@@ -185,4 +194,6 @@ record_verifiers = {
|
||||
VerifyLibxl.verify_record_xenstore_data,
|
||||
REC_TYPE_emulator_context:
|
||||
VerifyLibxl.verify_record_emulator_context,
|
||||
REC_TYPE_checkpoint_end:
|
||||
VerifyLibxl.verify_record_checkpoint_end,
|
||||
}
|
||||