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:
Andrew Cooper committed 2020-05-29 17:33:03 +01:00
1 parent 4f8b684117
commit a6a2b9d1ea
5 files changed
+47 -8

No files matched your search

+8 -1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.