ia64/xen-unstable

changeset 8074:486f4c9e1c22

Fix save/restore and migrate on x86_64.

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Sat Nov 26 12:13:39 2005 +0100 (2005-11-26)
parents 001ba14fbb1b
children bf09a8db5bb4
files tools/libxc/xc_linux_save.c tools/python/xen/xend/XendCheckpoint.py
line diff
     1.1 --- a/tools/libxc/xc_linux_save.c	Sat Nov 26 11:32:57 2005 +0100
     1.2 +++ b/tools/libxc/xc_linux_save.c	Sat Nov 26 12:13:39 2005 +0100
     1.3 @@ -457,6 +457,15 @@ void canonicalize_pagetable(unsigned lon
     1.4              xen_start = (hvirt_start >> L2_PAGETABLE_SHIFT_PAE) & 0x1ff; 
     1.5      }
     1.6  
     1.7 +	if (pt_levels == 4 && type == L4TAB) { 
     1.8 +		/* 
     1.9 +        ** XXX SMH: should compute these from hvirt_start (which we have) 
    1.10 +		** and hvirt_end (which we don't) 
    1.11 +        */
    1.12 +		xen_start = 256; 
    1.13 +		xen_end   = 272; 
    1.14 +	}
    1.15 +
    1.16      /* Now iterate through the page table, canonicalizing each PTE */
    1.17      for (i = 0; i < pte_last; i++ ) {
    1.18  
    1.19 @@ -721,12 +730,6 @@ int xc_linux_save(int xc_handle, int io_
    1.20      }
    1.21  
    1.22      /* Domain is still running at this point */
    1.23 -
    1.24 -    if (live && (pt_levels == 4)) {
    1.25 -        ERR("Live migration not supported for 64-bit guests");
    1.26 -        live = 0;
    1.27 -    }
    1.28 -
    1.29      if (live) {
    1.30  
    1.31          if (xc_shadow_control(xc_handle, dom, 
    1.32 @@ -811,7 +814,7 @@ int xc_linux_save(int xc_handle, int io_
    1.33          for (i = 0; i < max_pfn; i++) {
    1.34  
    1.35              mfn = live_p2m[i];
    1.36 -            if((mfn != 0xffffffffUL) && (mfn_to_pfn(mfn) != i)) { 
    1.37 +            if((mfn != INVALID_P2M_ENTRY) && (mfn_to_pfn(mfn) != i)) { 
    1.38                  DPRINTF("i=0x%x mfn=%lx live_m2p=%lx\n", i, 
    1.39                          mfn, mfn_to_pfn(mfn));
    1.40                  err++;
     2.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Sat Nov 26 11:32:57 2005 +0100
     2.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Sat Nov 26 12:13:39 2005 +0100
     2.3 @@ -128,7 +128,7 @@ def restore(xd, fd):
     2.4      try:
     2.5          l = read_exact(fd, sizeof_unsigned_long,
     2.6                         "not a valid guest state file: pfn count read")
     2.7 -        nr_pfns = unpack("=L", l)[0]   # XXX endianess
     2.8 +        nr_pfns = unpack("L", l)[0]    # native sizeof long
     2.9          if nr_pfns > 16*1024*1024:     # XXX 
    2.10              raise XendError(
    2.11                  "not a valid guest state file: pfn count out of range")