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 physdevop interface over t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: convert physdevop interface over to hypercall buffers
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:15:47 -0700
Delivery-date: Wed, 27 Oct 2010 19:18:33 -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 f18c32d6be8c2833b7346f2c06c81855d1c7c6a7
# Parent  8661e19747debaa8e7790fec0c9ed7a4c824bf5f
libxc: convert physdevop interface over to hypercall buffers

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
---
 tools/libxc/xc_private.h |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff -r 8661e19747de -r f18c32d6be8c tools/libxc/xc_private.h
--- a/tools/libxc/xc_private.h  Fri Oct 22 15:14:51 2010 +0100
+++ b/tools/libxc/xc_private.h  Fri Oct 22 15:14:51 2010 +0100
@@ -181,18 +181,18 @@ static inline int do_physdev_op(xc_inter
 static inline int do_physdev_op(xc_interface *xch, int cmd, void *op, size_t 
len)
 {
     int ret = -1;
-
-    DECLARE_HYPERCALL;
-
-    if ( hcall_buf_prep(xch, &op, len) != 0 )
-    {
-        PERROR("Could not lock memory for Xen hypercall");
+    DECLARE_HYPERCALL;
+    DECLARE_HYPERCALL_BOUNCE(op, len, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+
+    if ( xc_hypercall_bounce_pre(xch, op) )
+    {
+        PERROR("Could not bounce memory for physdev hypercall");
         goto out1;
     }
 
     hypercall.op = __HYPERVISOR_physdev_op;
     hypercall.arg[0] = (unsigned long) cmd;
-    hypercall.arg[1] = (unsigned long) op;
+    hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(op);
 
     if ( (ret = do_xen_hypercall(xch, &hypercall)) < 0 )
     {
@@ -201,8 +201,7 @@ static inline int do_physdev_op(xc_inter
                     " rebuild the user-space tool set?\n");
     }
 
-    hcall_buf_release(xch, &op, len);
-
+    xc_hypercall_bounce_post(xch, op);
 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 physdevop interface over to hypercall buffers, Xen patchbot-unstable <=