[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][HVM] fix save/restore on 64b HV



[PATCH][HVM] fix save/restore on 64b HV

Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>

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

diff -r b75af612851c xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Mon Jan 22 17:31:15 2007 +0000
+++ b/xen/arch/x86/domctl.c     Tue Jan 23 22:00:11 2007 +0800
@@ -311,12 +311,16 @@ _long arch_do_domctl(
         
         ret = -EFAULT;
 
-#ifndef CONFIG_COMPAT
+#ifndef COMPAT
         if ( copy_from_guest(c, domctl->u.hvmcontext.ctxt, 1) != 0 )
+#else
+        if ( copy_from_guest(c,
+                             compat_handle_cast(domctl->u.hvmcontext.ctxt, 
void),
+                             1) != 0 )
+#endif
             goto sethvmcontext_out;
 
         ret = arch_sethvm_ctxt(v, c);
-#endif
 
         xfree(c);
 
@@ -350,12 +354,16 @@ _long arch_do_domctl(
         if (arch_gethvm_ctxt(v, c) == -1)
             ret = -EFAULT;
 
-#ifndef CONFIG_COMPAT
+#ifndef COMPAT
         if ( copy_to_guest(domctl->u.hvmcontext.ctxt, c, 1) )
+#else
+        if ( copy_to_guest(compat_handle_cast(domctl->u.hvmcontext.ctxt,
+                                              void),
+                           c, 1) )
             ret = -EFAULT;
+#endif
 
         xfree(c);
-#endif
 
         if ( copy_to_guest(u_domctl, domctl, 1) )
             ret = -EFAULT;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.