# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 72a1421dcf1b247d10485be8f72112c7703e7667
# Parent bc1bfdb35f29504105f231f41cbcfe997c53e475
Better handle page type info becoming incoherent during live migrate.
Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>
diff -r bc1bfdb35f29 -r 72a1421dcf1b tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c Tue Nov 22 16:00:56 2005
+++ b/tools/libxc/xc_linux_save.c Tue Nov 22 16:50:41 2005
@@ -470,10 +470,9 @@
if (pte & _PAGE_PRESENT) {
mfn = (pte >> PAGE_SHIFT) & 0xfffffff;
- pfn = live_m2p[mfn];
-
if (!MFN_IS_IN_PSEUDOPHYS_MAP(mfn)) {
- /* I don't think this should ever happen */
+ /* This will happen if the type info is stale which
+ is quite feasible under live migration */
DPRINTF("FNI: [%08lx,%d] pte=%llx,"
" mfn=%08lx, pfn=%08lx [mfn]=%08lx\n",
type, i, (unsigned long long)pte, mfn,
@@ -482,7 +481,10 @@
live_p2m[live_m2p[mfn]] : 0xdeadbeaf);
pfn = 0; /* be suspicious */
- }
+ } else
+ pfn = live_m2p[mfn];
+
+
pte &= 0xffffff0000000fffULL;
pte |= (uint64_t)pfn << PAGE_SHIFT;
@@ -1031,7 +1033,7 @@
if (last_iter && debug){
int minusone = -1;
- memset( to_send, 0xff, (max_pfn+8)/8 );
+ memset(to_send, 0xff, BITMAP_SIZE);
debug = 0;
fprintf(stderr, "Entering debug resend-all mode\n");
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|