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: convert schedop interfaces over to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: convert schedop interfaces over to hypercall buffers
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:15:46 -0700
Delivery-date: Wed, 27 Oct 2010 19:18:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1287756891 -3600
# Node ID 8661e19747debaa8e7790fec0c9ed7a4c824bf5f
# Parent  d539e92897c9dd26da2285a0f6e442bba4f82522
libxc: convert schedop interfaces over to hypercall buffers

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
---
 tools/libxc/xc_domain.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff -r d539e92897c9 -r 8661e19747de tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Fri Oct 22 15:14:51 2010 +0100
+++ b/tools/libxc/xc_domain.c   Fri Oct 22 15:14:51 2010 +0100
@@ -85,24 +85,25 @@ int xc_domain_shutdown(xc_interface *xch
                        int reason)
 {
     int ret = -1;
-    sched_remote_shutdown_t arg;
     DECLARE_HYPERCALL;
+    DECLARE_HYPERCALL_BUFFER(sched_remote_shutdown_t, arg);
+
+    arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg));
+    if ( arg == NULL )
+    {
+        PERROR("Could not allocate memory for xc_domain_shutdown hypercall");
+        goto out1;
+    }
 
     hypercall.op     = __HYPERVISOR_sched_op;
     hypercall.arg[0] = (unsigned long)SCHEDOP_remote_shutdown;
-    hypercall.arg[1] = (unsigned long)&arg;
-    arg.domain_id = domid;
-    arg.reason = reason;
-
-    if ( lock_pages(xch, &arg, sizeof(arg)) != 0 )
-    {
-        PERROR("Could not lock memory for Xen hypercall");
-        goto out1;
-    }
+    hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg);
+    arg->domain_id = domid;
+    arg->reason = reason;
 
     ret = do_xen_hypercall(xch, &hypercall);
 
-    unlock_pages(xch, &arg, sizeof(arg));
+    xc_hypercall_buffer_free(xch, arg);
 
  out1:
     return ret;

_______________________________________________
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: convert schedop interfaces over to hypercall buffers, Xen patchbot-unstable <=