aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xg_save_restore.h
diff options
context:
space:
mode:
authorsmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>2005-11-21 16:40:16 +0100
committersmh22@firebug.cl.cam.ac.uk <smh22@firebug.cl.cam.ac.uk>2005-11-21 16:40:16 +0100
commit7cdf0f64076d05bab8edaac9aa02ddfef510afb5 (patch)
tree547d0fa7c7a4d710771432de4e1edf77cf9124dc /tools/libxc/xg_save_restore.h
parentdaee19a8a758c6f4add816b3f127a9cba04de1ce (diff)
downloadxen-7cdf0f64076d05bab8edaac9aa02ddfef510afb5.tar.gz
xen-7cdf0f64076d05bab8edaac9aa02ddfef510afb5.tar.bz2
xen-7cdf0f64076d05bab8edaac9aa02ddfef510afb5.zip
Fix 'belt + braces' check in xc_linux_save and improve error handling
for live migrate (this includes making shadow enable idempotent). Signed-off-by: Steven Hand <steven@xensource.com>
Diffstat (limited to 'tools/libxc/xg_save_restore.h')
-rw-r--r--tools/libxc/xg_save_restore.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h
index d4eba303c3..c735deab41 100644
--- a/tools/libxc/xg_save_restore.h
+++ b/tools/libxc/xg_save_restore.h
@@ -125,6 +125,12 @@ static int get_platform_info(int xc_handle, uint32_t dom,
/* Number of entries in the pfn_to_mfn_frame_list_list */
#define P2M_FLL_ENTRIES (((max_pfn)+(ulpp*ulpp)-1)/(ulpp*ulpp))
+/* Current guests allow 8MB 'slack' in their P2M */
+#define NR_SLACK_ENTRIES ((8 * 1024 * 1024) / PAGE_SIZE)
+
+/* Is the given PFN within the 'slack' region at the top of the P2M? */
+#define IS_REAL_PFN(_pfn) ((max_pfn - (_pfn)) > NR_SLACK_ENTRIES)
+
/* Returns TRUE if the PFN is currently mapped */
#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))