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

[Xen-changelog] [xen-unstable] [HVM] fix save/restore on 64b HV



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169565977 0
# Node ID fe01db0e59a384d0ce7d1590100621d6cfcb8edc
# Parent  3071537af9d844465e3513e7f7bf610da45e6160
[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@xxxxxxxxx>
---
 xen/arch/x86/domctl.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff -r 3071537af9d8 -r fe01db0e59a3 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Tue Jan 23 15:14:45 2007 +0000
+++ b/xen/arch/x86/domctl.c     Tue Jan 23 15:26:17 2007 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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