libxc/restore: Introduce functionality to simplify blob handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Dec 2019 19:01:57 +0000 (19:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 Jan 2020 15:22:28 +0000 (15:22 +0000)
commit59e1f6d897102dd53abd77d84a308a4f308ddf06
treeb014f50c753cbf99fa50664fe8208a55993f015d
parentb4194711ffaffa5e63d986338fb8d4020fa6bad1
libxc/restore: Introduce functionality to simplify blob handling

During migration, we buffer several blobs of data which ultimately need
handing back to Xen at an appropriate time.

Currently, this is all handled in an ad-hoc manner, but more blobs are soon
going to be added.  Introduce xc_sr_blob to encapsulate a ptr/size pair, and
update_blob() to handle the memory management aspects.

Switch the HVM_CONTEXT and the four PV_VCPU_* blobs over to this new
infrastructure.  No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_sr_common.h
tools/libxc/xc_sr_restore_x86_hvm.c
tools/libxc/xc_sr_restore_x86_pv.c