|
|
1a774a7 |
From 3460eeb3fc2811efcf2e8ac13a0882ab72ef92bc Mon Sep 17 00:00:00 2001
|
|
|
1a774a7 |
From: Wen Congyang <wency@cn.fujitsu.com>
|
|
|
1a774a7 |
Date: Mon, 22 Sep 2014 13:59:14 +0800
|
|
|
1a774a7 |
Subject: [PATCH] tools: libxc: restore: csum the correct page
|
|
|
1a774a7 |
|
|
|
1a774a7 |
In verify mode, we map the guest memory, and the guest page is
|
|
|
1a774a7 |
region_base + i * PAGE_SIZE. So we should csum page (region_base
|
|
|
1a774a7 |
+ i * PAGE_SIZE), not (region_base + (i+curbatch) * PAGE_SIZE)
|
|
|
1a774a7 |
|
|
|
1a774a7 |
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
|
|
|
1a774a7 |
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
1a774a7 |
---
|
|
|
1a774a7 |
tools/libxc/xc_domain_restore.c | 2 +-
|
|
|
1a774a7 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
1a774a7 |
|
|
|
1a774a7 |
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
|
|
|
1a774a7 |
index bec716c..fb4ddfc 100644
|
|
|
1a774a7 |
--- a/tools/libxc/xc_domain_restore.c
|
|
|
1a774a7 |
+++ b/tools/libxc/xc_domain_restore.c
|
|
|
1a774a7 |
@@ -1405,7 +1405,7 @@ static int apply_batch(xc_interface *xch, uint32_t dom, struct restore_ctx *ctx,
|
|
|
1a774a7 |
|
|
|
1a774a7 |
DPRINTF("************** pfn=%lx type=%lx gotcs=%08lx "
|
|
|
1a774a7 |
"actualcs=%08lx\n", pfn, pagebuf->pfn_types[pfn],
|
|
|
1a774a7 |
- csum_page(region_base + (i + curbatch)*PAGE_SIZE),
|
|
|
1a774a7 |
+ csum_page(region_base + i * PAGE_SIZE),
|
|
|
1a774a7 |
csum_page(buf));
|
|
|
1a774a7 |
|
|
|
1a774a7 |
for ( v = 0; v < 4; v++ )
|
|
|
1a774a7 |
--
|
|
|
1a774a7 |
1.7.2.5
|
|
|
1a774a7 |
|