ia64/xen-unstable

changeset 10400:b0ba792f3935

[TOOLS] Fix PAE save/restore/migrate: we must flush
all pending 'mmu updates' before moving page directories
below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@dhcp93.uk.xensource.com
date Tue Jun 13 17:30:30 2006 +0100 (2006-06-13)
parents a734745bf058
children 5552bc2c3716
files tools/libxc/xc_linux_restore.c
line diff
     1.1 --- a/tools/libxc/xc_linux_restore.c	Tue Jun 13 16:07:16 2006 +0100
     1.2 +++ b/tools/libxc/xc_linux_restore.c	Tue Jun 13 17:30:30 2006 +0100
     1.3 @@ -456,6 +456,15 @@ int xc_linux_restore(int xc_handle, int 
     1.4          n+= j; /* crude stats */
     1.5      }
     1.6  
     1.7 +    /*
     1.8 +     * Ensure we flush all machphys updates before potential PAE-specific
     1.9 +     * reallocations below.
    1.10 +     */
    1.11 +    if (xc_finish_mmu_updates(xc_handle, mmu)) {
    1.12 +        ERR("Error doing finish_mmu_updates()");
    1.13 +        goto out;
    1.14 +    }
    1.15 +
    1.16      DPRINTF("Received all pages (%d races)\n", nraces);
    1.17  
    1.18      if ((pt_levels == 3) && !pae_extended_cr3) {
    1.19 @@ -550,15 +559,12 @@ int xc_linux_restore(int xc_handle, int 
    1.20              }
    1.21          }
    1.22  
    1.23 +        if (xc_finish_mmu_updates(xc_handle, mmu)) {
    1.24 +            ERR("Error doing finish_mmu_updates()");
    1.25 +            goto out;
    1.26 +        }
    1.27      }
    1.28  
    1.29 -
    1.30 -    if (xc_finish_mmu_updates(xc_handle, mmu)) {
    1.31 -        ERR("Error doing finish_mmu_updates()");
    1.32 -        goto out;
    1.33 -    }
    1.34 -
    1.35 -
    1.36      /*
    1.37       * Pin page tables. Do this after writing to them as otherwise Xen
    1.38       * will barf when doing the type-checking.