]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
[TOOLS] Fix PAE save/restore/migrate: we must flush
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 13 Jun 2006 16:38:16 +0000 (17:38 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 13 Jun 2006 16:38:16 +0000 (17:38 +0100)
all pending 'mmu updates' before moving page directories
below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   10345:b0ba792f393520a4262aa06f5ab2395efa1a32c2
xen-unstable date:        Tue Jun 13 17:30:30 2006 +0100

tools/libxc/xc_linux_restore.c

index c72581955eb45ee304647a93f41285c2232dfc79..9ef994995c8521fcce710b8e06029bf89edb6d17 100644 (file)
@@ -429,6 +429,15 @@ int xc_linux_restore(int xc_handle, int io_fd,
         n+= j; /* crude stats */
     }
 
+    /*
+     * Ensure we flush all machphys updates before potential PAE-specific
+     * reallocations below.
+     */
+    if (xc_finish_mmu_updates(xc_handle, mmu)) {
+        ERR("Error doing finish_mmu_updates()");
+        goto out;
+    }
+
     DPRINTF("Received all pages (%d races)\n", nraces);
 
     if(pt_levels == 3) { 
@@ -523,15 +532,12 @@ int xc_linux_restore(int xc_handle, int io_fd,
             }
         }
 
+        if (xc_finish_mmu_updates(xc_handle, mmu)) { 
+            ERR("Error doing finish_mmu_updates()"); 
+            goto out;
+        } 
     }
 
-
-    if (xc_finish_mmu_updates(xc_handle, mmu)) { 
-        ERR("Error doing finish_mmu_updates()"); 
-        goto out;
-    } 
-
-
     /*
      * Pin page tables. Do this after writing to them as otherwise Xen
      * will barf when doing the type-checking.