libxc: stop migration in case of p2m list structural changes
authorJuergen Gross <jgross@suse.com>
Thu, 7 Jan 2016 12:36:53 +0000 (13:36 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 7 Jan 2016 12:49:34 +0000 (12:49 +0000)
commit8429374f4410f4c7769170a1423a6404664151a7
tree5fbe4b2ceab533b21dada4cea421af4413d30f53
parent7bf74582b343603cb0826d808cd7da43326452a5
libxc: stop migration in case of p2m list structural changes

With support of the virtual mapped linear p2m list for migration it is
now possible to detect structural changes of the p2m list which before
would either lead to a crashing or otherwise wrong behaving domU.

A guest supporting the linear p2m list will increment the
p2m_generation counter located in the shared info page before and after
each modification of a mapping related to the p2m list. A change of
that counter can be detected by the tools and reacted upon.

As such a change should occur only very rarely once the domU is up the
most simple reaction is to cancel migration in such an event.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@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