tools/migration: unify type checking for data pfns in the VM
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Jul 2021 09:56:07 +0000 (11:56 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Jul 2021 09:49:58 +0000 (10:49 +0100)
commit5588ebcfca774477cf823949e5703b0ac48818cc
treedcb79081007caf7e34d3d57034eb5701e99a48b6
parent9e59d9f8ee3808acde9833192211da25f66d8cc2
tools/migration: unify type checking for data pfns in the VM

Introduce a helper which decides if a given pfn in the migration
stream is backed by memory.

This highlights more clearly that type XEN_DOMCTL_PFINFO_XALLOC (a
synthetic toolstack-only type used between Xen 4.2 to 4.5 which
indicated a dirty page on the sending side for which no data will be
send in the initial iteration) does get populated in the VM.

No change in behaviour intended, except for invalid page types which now
have a safer default.

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