From 5e1e26bd96648683705e28b545345ed86380159e Mon Sep 17 00:00:00 2001 From: "smh22@firebug.cl.cam.ac.uk" Date: Thu, 6 Apr 2006 17:34:54 +0100 Subject: [PATCH] Make root page table sanity check on restore more generic. Signed-off-by: Steven Hand --- tools/libxc/xc_linux_restore.c | 12 ++++-------- xen/include/public/dom0_ops.h | 13 +++++++------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 7d8ebda0c7..0a52758327 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -646,18 +646,14 @@ int xc_linux_restore(int xc_handle, int io_fd, goto out; } - if ((pt_levels == 2) && ((pfn_type[pfn]<ABTYPE_MASK) != L2TAB)) { + if ( (pfn_type[pfn] & LTABTYPE_MASK) != + ((unsigned long)pt_levels<