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 mca interface over to hype

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: convert mca interface over to hypercall buffers
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:15:51 -0700
Delivery-date: Wed, 27 Oct 2010 19:19:07 -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 480197ff0be2c9df3bff187e9aba35d3f8d95789
# Parent  001e48a6f088cf023a0d8dc7d604c49264189019
libxc: convert mca 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_misc.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff -r 001e48a6f088 -r 480197ff0be2 tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c     Fri Oct 22 15:14:51 2010 +0100
+++ b/tools/libxc/xc_misc.c     Fri Oct 22 15:14:51 2010 +0100
@@ -167,18 +167,19 @@ int xc_mca_op(xc_interface *xch, struct 
 {
     int ret = 0;
     DECLARE_HYPERCALL;
-
+    DECLARE_HYPERCALL_BOUNCE(mc, sizeof(*mc), XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+
+    if ( xc_hypercall_bounce_pre(xch, mc) )
+    {
+        PERROR("Could not bounce xen_mc memory buffer");
+        return -1;
+    }
     mc->interface_version = XEN_MCA_INTERFACE_VERSION;
-    if ( lock_pages(xch, mc, sizeof(*mc)) )
-    {
-        PERROR("Could not lock xen_mc memory");
-        return -EINVAL;
-    }
 
     hypercall.op = __HYPERVISOR_mca;
-    hypercall.arg[0] = (unsigned long)mc;
+    hypercall.arg[0] = HYPERCALL_BUFFER_AS_ARG(mc);
     ret = do_xen_hypercall(xch, &hypercall);
-    unlock_pages(xch, mc, sizeof(*mc));
+    xc_hypercall_bounce_post(xch, mc);
     return ret;
 }
 #endif

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