libxc/save: Adjust stream-position callbacks for checkpointed streams
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 14 May 2015 08:55:04 +0000 (16:55 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 14 May 2015 12:00:57 +0000 (13:00 +0100)
commitae0a3e9bbe37ec90edb3b1cd49cba6d943bfcd4c
tree95dadd824167d7b65da1b9a8144f912d1bdec68e
parent6abbcd3e380c3c829cf366ff2c0669226356b777
libxc/save: Adjust stream-position callbacks for checkpointed streams

There are some records which should only be sent once in the stream, and not
repeated for each checkpoint.  {start,end}_of_stream() become per-checkpoint,
and a new start_of_stream() is introduced.

There is no resulting change record order, but the X86_PV_INFO record is
identified as once per stream.  Currently the X86_PV_P2M_FRAMES record is as
well, but this is because of an implementation bug and can move back to being
on an as-needed basis when fixed.

In addition, a few minor adjustments of comments and layout.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Yang Hongyang <yanghy@cn.fujitsu.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxc/xc_sr_common.h
tools/libxc/xc_sr_save.c
tools/libxc/xc_sr_save_x86_hvm.c
tools/libxc/xc_sr_save_x86_pv.c