Currently we convert from maxmemkb to pages this way: pages = max_memkb >> (PAGE_SHIFT - 10) But I guess it is safer to do it like this (for more cautions and we lose nothing anyway): pages = (max_memkb + (1 << (PAGE_SHIFT-10)) - 1) >> (PAGE_SHIFT - 10) Signed-off-by Nguyen Anh Quynh <aquynh@gmail.com> $ diffstat maxmem2.patch tools/libxc/xc_linux_save.c | 2 +- xen/common/dom0_ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel