WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [LIBXC] Fix non-x86 build.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LIBXC] Fix non-x86 build.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 08:50:07 -0800
Delivery-date: Mon, 22 Jan 2007 08:50:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169393944 0
# Node ID c3e19108f3edab2632e8e782f1d8147f0b25ca3d
# Parent  7e28a8c150edae62aa1a7db4411eb6efbb96af7e
[LIBXC] Fix non-x86 build.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_resume.c |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff -r 7e28a8c150ed -r c3e19108f3ed tools/libxc/xc_resume.c
--- a/tools/libxc/xc_resume.c   Sat Jan 20 14:33:43 2007 +0000
+++ b/tools/libxc/xc_resume.c   Sun Jan 21 15:39:04 2007 +0000
@@ -1,4 +1,27 @@
 #include "xc_private.h"
+
+
+#if defined(__i386__) || defined(__x86_64__)
+static int modify_returncode(int xc_handle, uint32_t domid)
+{
+    vcpu_guest_context_t ctxt;
+    int rc;
+
+    if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+        return rc;
+    ctxt.user_regs.eax = 1;
+    if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+        return rc;
+
+    return 0;
+}
+#else
+static int modify_returncode(int xc_handle, uint32_t domid)
+{
+    return 0;
+}
+#endif
+
 
 /*
  * Resume execution of a domain after suspend shutdown.
@@ -13,7 +36,6 @@
  */
 int xc_domain_resume(int xc_handle, uint32_t domid)
 {
-    vcpu_guest_context_t ctxt;
     DECLARE_DOMCTL;
     int rc;
 
@@ -21,13 +43,8 @@ int xc_domain_resume(int xc_handle, uint
      * Set hypercall return code to indicate that suspend is cancelled
      * (rather than resuming in a new domain context).
      */
-#if defined(__i386__) || defined(__x86_64__)
-    if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+    if ( (rc = modify_returncode(xc_handle, domid)) != 0 )
         return rc;
-    ctxt.user_regs.eax = 1;
-    if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
-        return rc;
-#endif
 
     domctl.cmd = XEN_DOMCTL_resumedomain;
     domctl.domain = domid;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LIBXC] Fix non-x86 build., Xen patchbot-unstable <=