ia64/xen-unstable

changeset 14207:33d733c3649d

[tools] Set guest address size to be the same as dom0 address size on restore.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Thu Mar 01 17:28:31 2007 +0000 (2007-03-01)
parents 5dac445200e3
children 139794d55898
files tools/libxc/xc_linux_restore.c
line diff
     1.1 --- a/tools/libxc/xc_linux_restore.c	Thu Mar 01 17:27:31 2007 +0000
     1.2 +++ b/tools/libxc/xc_linux_restore.c	Thu Mar 01 17:28:31 2007 +0000
     1.3 @@ -192,6 +192,19 @@ int xc_linux_restore(int xc_handle, int 
     1.4  
     1.5      DPRINTF("xc_linux_restore start: max_pfn = %lx\n", max_pfn);
     1.6  
     1.7 +    /*
     1.8 +     * XXX For now, 32bit dom0's can only save/restore 32bit domUs
     1.9 +     * on 64bit hypervisors.
    1.10 +     */
    1.11 +    memset(&domctl, 0, sizeof(domctl));
    1.12 +    domctl.domain = dom;
    1.13 +    domctl.cmd    = XEN_DOMCTL_set_address_size;
    1.14 +    domctl.u.address_size.size = sizeof(unsigned long) * 8;
    1.15 +    rc = do_domctl(xc_handle, &domctl);
    1.16 +    if ( rc != 0 ) {
    1.17 +	ERROR("Unable to set guest address size.");
    1.18 +	goto out;
    1.19 +    }
    1.20  
    1.21      if(!get_platform_info(xc_handle, dom,
    1.22                            &max_mfn, &hvirt_start, &pt_levels)) {