direct-io.hg

changeset 13566:fe01db0e59a3

[HVM] fix save/restore on 64b HV

Enable hvm_ctxt ops for compat mode to fix HVM save/restore on 64b HV.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
author kfraser@localhost.localdomain
date Tue Jan 23 15:26:17 2007 +0000 (2007-01-23)
parents 3071537af9d8
children 373b09ddc905
files xen/arch/x86/domctl.c
line diff
     1.1 --- a/xen/arch/x86/domctl.c	Tue Jan 23 15:14:45 2007 +0000
     1.2 +++ b/xen/arch/x86/domctl.c	Tue Jan 23 15:26:17 2007 +0000
     1.3 @@ -311,12 +311,16 @@
     1.4          
     1.5          ret = -EFAULT;
     1.6  
     1.7 -#ifndef CONFIG_COMPAT
     1.8 +#ifndef COMPAT
     1.9          if ( copy_from_guest(c, domctl->u.hvmcontext.ctxt, 1) != 0 )
    1.10 +#else
    1.11 +        if ( copy_from_guest(c,
    1.12 +                             compat_handle_cast(domctl->u.hvmcontext.ctxt, void),
    1.13 +                             1) != 0 )
    1.14 +#endif
    1.15              goto sethvmcontext_out;
    1.16  
    1.17          ret = arch_sethvm_ctxt(v, c);
    1.18 -#endif
    1.19  
    1.20          xfree(c);
    1.21  
    1.22 @@ -350,12 +354,16 @@
    1.23          if (arch_gethvm_ctxt(v, c) == -1)
    1.24              ret = -EFAULT;
    1.25  
    1.26 -#ifndef CONFIG_COMPAT
    1.27 +#ifndef COMPAT
    1.28          if ( copy_to_guest(domctl->u.hvmcontext.ctxt, c, 1) )
    1.29 +#else
    1.30 +        if ( copy_to_guest(compat_handle_cast(domctl->u.hvmcontext.ctxt,
    1.31 +                                              void),
    1.32 +                           c, 1) )
    1.33              ret = -EFAULT;
    1.34 +#endif
    1.35  
    1.36          xfree(c);
    1.37 -#endif
    1.38  
    1.39          if ( copy_to_guest(u_domctl, domctl, 1) )
    1.40              ret = -EFAULT;