mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxc/save: Write a v3 stream
Introduce a new static_data() hook which is responsible for writing out any static data records. The HVM side continues to be a no-op, while the PV side moves write_x86_pv_info() into this earlier hook. The the common code writes out a STATIC_DATA_END record, and the stream version is bumped to 3. Update convert-legacy-stream to write a v3 stream, because this will bypass the compatibly logic in libxc. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
4f8b684117
commit
a6a2b9d1ea
5 files changed
+47
-8
No files matched your search
@@ -79,7 +79,7 @@ def write_libxc_ihdr():
|
||||
stream_write(pack(libxc.IHDR_FORMAT,
|
||||
libxc.IHDR_MARKER, # Marker
|
||||
libxc.IHDR_IDENT, # Ident
|
||||
2, # Version
|
||||
3, # Version
|
||||
libxc.IHDR_OPT_LE, # Options
|
||||
0, 0)) # Reserved
|
||||
|
||||
@@ -166,6 +166,9 @@ def write_libxc_hvm_params(params):
|
||||
pack(libxc.HVM_PARAMS_FORMAT, len(params) / 2, 0),
|
||||
pack("Q" * len(params), *params))
|
||||
|
||||
def write_libxc_static_data_end():
|
||||
write_record(libxc.REC_TYPE_static_data_end)
|
||||
|
||||
def write_libxl_end():
|
||||
write_record(libxl.REC_TYPE_end)
|
||||
|
||||
@@ -590,6 +593,10 @@ def read_legacy_stream(vm):
|
||||
|
||||
if pv:
|
||||
read_pv_extended_info(vm)
|
||||
|
||||
write_libxc_static_data_end()
|
||||
|
||||
if pv:
|
||||
read_pv_p2m_frames(vm)
|
||||
|
||||
read_chunks(vm)
|
||||
|
||||