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 evtchn interfaces over to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: convert evtchn interfaces over to hypercall buffers
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:15:44 -0700
Delivery-date: Wed, 27 Oct 2010 19:18:17 -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 d539e92897c9dd26da2285a0f6e442bba4f82522
# Parent  dfdfb1ec4ad03f2b7bdeababfd78e1c5b5575842
libxc: convert evtchn 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_evtchn.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff -r dfdfb1ec4ad0 -r d539e92897c9 tools/libxc/xc_evtchn.c
--- a/tools/libxc/xc_evtchn.c   Fri Oct 22 15:14:51 2010 +0100
+++ b/tools/libxc/xc_evtchn.c   Fri Oct 22 15:14:51 2010 +0100
@@ -22,31 +22,30 @@
 
 #include "xc_private.h"
 
-
 static int do_evtchn_op(xc_interface *xch, int cmd, void *arg,
                         size_t arg_size, int silently_fail)
 {
     int ret = -1;
     DECLARE_HYPERCALL;
+    DECLARE_HYPERCALL_BOUNCE(arg, arg_size, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+
+    if ( xc_hypercall_bounce_pre(xch, arg) )
+    {
+        PERROR("do_evtchn_op: bouncing arg failed");
+        goto out;
+    }
 
     hypercall.op     = __HYPERVISOR_event_channel_op;
     hypercall.arg[0] = cmd;
-    hypercall.arg[1] = (unsigned long)arg;
-
-    if ( lock_pages(xch, arg, arg_size) != 0 )
-    {
-        PERROR("do_evtchn_op: arg lock failed");
-        goto out;
-    }
+    hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg);
 
     if ((ret = do_xen_hypercall(xch, &hypercall)) < 0 && !silently_fail)
         ERROR("do_evtchn_op: HYPERVISOR_event_channel_op failed: %d", ret);
 
-    unlock_pages(xch, arg, arg_size);
+    xc_hypercall_bounce_post(xch, arg);
  out:
     return ret;
 }
-
 
 evtchn_port_or_error_t
 xc_evtchn_alloc_unbound(xc_interface *xch,

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