All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
	Tim Deegan <Tim.Deegan@xensource.com>
Cc: xen-devel@lists.xensource.com, edwin.zhai@intel.com
Subject: [PATCH][HVM] fix save/restore on 64b HV
Date: Tue, 23 Jan 2007 23:14:33 +0800	[thread overview]
Message-ID: <20070123151433.GA30643@edwin-gen.sh.intel.com> (raw)

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

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

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;

                 reply	other threads:[~2007-01-23 15:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070123151433.GA30643@edwin-gen.sh.intel.com \
    --to=edwin.zhai@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=Tim.Deegan@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.