aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_foreign_memory.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:47 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:47 +0000
commitf32797d3310d8eb1851b07249f5270f1be1ae39a (patch)
treee7ff4931b1e93f6bdf2a0771b0bc5a1cf319fba0 /tools/libxc/xc_foreign_memory.c
parent2e04f9622fa58db6a5f4a1f8242877af25429db6 (diff)
downloadxen-f32797d3310d8eb1851b07249f5270f1be1ae39a.tar.gz
xen-f32797d3310d8eb1851b07249f5270f1be1ae39a.tar.bz2
xen-f32797d3310d8eb1851b07249f5270f1be1ae39a.zip
libxc: osdep: convert xc_map_foreign_{batch,bulk}
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxc/xc_foreign_memory.c')
-rw-r--r--tools/libxc/xc_foreign_memory.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libxc/xc_foreign_memory.c
new file mode 100644
index 0000000000..953f63bbaf
--- /dev/null
+++ b/tools/libxc/xc_foreign_memory.c
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * xc_foreign_memory.c
+ *
+ * Functions for mapping foreign domain's memory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "xc_private.h"
+
+void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot,
+ xen_pfn_t *arr, int num )
+{
+ return xch->ops->u.privcmd.map_foreign_batch(xch, xch->ops_handle,
+ dom, prot, arr, num);
+}
+
+void *xc_map_foreign_bulk(xc_interface *xch, uint32_t dom, int prot,
+ const xen_pfn_t *arr, int *err, unsigned int num)
+{
+ return xch->ops->u.privcmd.map_foreign_bulk(xch, xch->ops_handle,
+ dom, prot, arr, err, num);
+}