tools/migration: unify known page type checking
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Jul 2021 09:56:05 +0000 (11:56 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Jul 2021 09:49:58 +0000 (10:49 +0100)
commit9e59d9f8ee3808acde9833192211da25f66d8cc2
tree448ebf5cddcad5136ce30d92accac9d85ca154e6
parenta27976a1080d537fb1f212a8f9133d60daa0025b
tools/migration: unify known page type checking

Users of xc_get_pfn_type_batch may want to sanity check the data
returned by Xen. Add helpers for this purpose:

is_known_page_type verifies the type returned by Xen on the saving
side, or the incoming type for a page on the restoring side, is known
by the save/restore code.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/guest/xg_sr_common.h
tools/libs/guest/xg_sr_restore.c
tools/libs/guest/xg_sr_save.c