From: Wen Congyang Date: Mon, 22 Sep 2014 05:59:14 +0000 (+0800) Subject: tools: libxc: restore: csum the correct page X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4392 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3460eeb3fc2811efcf2e8ac13a0882ab72ef92bc;p=xen.git tools: libxc: restore: csum the correct page In verify mode, we map the guest memory, and the guest page is region_base + i * PAGE_SIZE. So we should csum page (region_base + i * PAGE_SIZE), not (region_base + (i+curbatch) * PAGE_SIZE) Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index bec716c4cd..fb4ddfc6b2 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1405,7 +1405,7 @@ static int apply_batch(xc_interface *xch, uint32_t dom, struct restore_ctx *ctx, DPRINTF("************** pfn=%lx type=%lx gotcs=%08lx " "actualcs=%08lx\n", pfn, pagebuf->pfn_types[pfn], - csum_page(region_base + (i + curbatch)*PAGE_SIZE), + csum_page(region_base + i * PAGE_SIZE), csum_page(buf)); for ( v = 0; v < 4; v++ )