xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com, xen-devel@lists.xen.org
Cc: roger.pau@citrix.com, Ian Campbell <ian.campbell@citrix.com>,
	stefano.stabellini@eu.citrix.com
Subject: [PATCH XEN v2 11/15] tools/libxc: drop xc_map_foreign_bulk_compat wrappers
Date: Wed, 15 Jul 2015 16:46:59 +0100	[thread overview]
Message-ID: <1436975223-11098-11-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1436975173.32371.121.camel@citrix.com>

On Solaris and NetBSD xc_map_foreign_bulk is implemented by calling
xc_map_foreign_bulk_compat and xc_map_foreign_bulk_compat is exposed
as a symbol by libxenctrl.so.

Remove these wrappers and turn the compat function into the real thing
surrounded by the appropriate ifdef.

As this is a compat function all new ports should instead implement
xc_map_foreign_bulk properly, hence the ifdef should never be
expanded.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 docs/misc/toolstack-library-abis.pandoc |  4 ----
 tools/libxc/xc_foreign_memory.c         | 13 +++++++++----
 tools/libxc/xc_netbsd.c                 |  7 -------
 tools/libxc/xc_private.h                |  5 -----
 tools/libxc/xc_solaris.c                |  7 -------
 5 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/docs/misc/toolstack-library-abis.pandoc b/docs/misc/toolstack-library-abis.pandoc
index 8339834..271e4b5 100644
--- a/docs/misc/toolstack-library-abis.pandoc
+++ b/docs/misc/toolstack-library-abis.pandoc
@@ -276,10 +276,6 @@ Interface                         Underlying interface           Known external
 `xc_map_foreign_ranges`
 `xc_map_foreign_batch`
 `xc_map_foreign_bulk`             `IOCTL_PRIVCMD_MMAPBATCH_V2`   qemu-dm
-`xc_map_foreign_bulk_compat`                                     private
-
-`xc_map_foreign_bulk_compat` is a stub for all not yet converted OSes
-and is used by netbsd & solaris.
 
 ### Managing guest memory map
 
diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libxc/xc_foreign_memory.c
index 53b6c9a..da77e9d 100644
--- a/tools/libxc/xc_foreign_memory.c
+++ b/tools/libxc/xc_foreign_memory.c
@@ -51,10 +51,14 @@ void *xc_map_foreign_pages(xc_interface *xch, uint32_t dom, int prot,
     return res;
 }
 
-/* stub for all not yet converted OSes */
-void *xc_map_foreign_bulk_compat(xc_interface *xch,
-                                 uint32_t dom, int prot,
-                                 const xen_pfn_t *arr, int *err, unsigned int num)
+/*
+ * stub for all not yet converted OSes (NetBSD and Solaris). New OSes should
+ * just implement xc_map_foreign_bulk.
+ */
+#if defined(__NetBSD__) || defined(__sun__)
+void *xc_map_foreign_bulk(xc_interface *xch,
+                          uint32_t dom, int prot,
+                          const xen_pfn_t *arr, int *err, unsigned int num)
 {
     xen_pfn_t *pfn;
     unsigned int i;
@@ -91,6 +95,7 @@ void *xc_map_foreign_bulk_compat(xc_interface *xch,
 
     return ret;
 }
+#endif
 
 /*
  * Local variables:
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 78683a2..a61e52f 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -68,13 +68,6 @@ int osdep_privcmd_close(xc_interface *xch)
     return close(fd);
 }
 
-void *xc_map_foreign_bulk(xc_interface *xch,
-                          uint32_t dom, int prot,
-                          const xen_pfn_t *arr, int *err, unsigned int num)
-{
-    return xc_map_foreign_bulk_compat(xch, dom, prot, arr, err, num);
-}
-
 void *xc_map_foreign_batch(xc_interface *xch,
                            uint32_t dom, int prot,
                            xen_pfn_t *arr, int num)
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 2288660..c8c2bdc 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -108,11 +108,6 @@ int osdep_privcmd_close(xc_interface *xch);
 void *osdep_alloc_hypercall_buffer(xc_interface *xch, int npages);
 void osdep_free_hypercall_buffer(xc_interface *xch, void *ptr, int npages);
 
-/* Stub for not yet converted OSes */
-void *xc_map_foreign_bulk_compat(xc_interface *xch,
-                                 uint32_t dom, int prot,
-                                 const xen_pfn_t *arr, int *err, unsigned int num);
-
 void xc_report_error(xc_interface *xch, int code, const char *fmt, ...)
     __attribute__((format(printf,3,4)));
 void xc_reportv(xc_interface *xch, xentoollog_logger *lg, xentoollog_level,
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index cbac826..1e1a0c4 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -95,13 +95,6 @@ void *xc_map_foreign_batch(xc_interface *xch,
 
 }
 
-void *xc_map_foreign_bulk(xc_interface *xch,
-                          uint32_t dom, int prot,
-                          const xen_pfn_t *arr, int *err, unsigned int num)
-{
-    return xc_map_foreign_bulk_compat(xch, dom, prot, arr, err, num);
-}
-
 void *xc_map_foreign_range(xc_interface *xch,
                            uint32_t dom,
                            int size, int prot,
-- 
2.1.4

  parent reply	other threads:[~2015-07-15 15:46 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 15:46 [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 01/15] docs: Partial toolstack library API/ABI stabilisation Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 02/15] tools/Rules.mk: Properly handle libraries with recursive dependcies Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 03/15] tools: Refactor "xentoollog" into its own library Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 04/15] tools/libxc: Remove osdep indirection for xc_evtchn Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 05/15] tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn Ian Campbell
2015-09-21 15:53   ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 06/15] tools: Arrange to check public headers for ANSI compatiblity Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 07/15] tools/libxc: Remove osdep indirection for xc_gnt{shr, tab} Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 08/15] tools: Refactor /dev/xen/gnt{dev, shr} wrappers into libxengnttab Ian Campbell
2015-09-22 11:25   ` Ian Campbell
2015-09-22 11:36     ` Andrew Cooper
2015-09-22 12:41       ` Ian Jackson
2015-09-22 12:51         ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 09/15] tools/libxc: Remove osdep indirection for privcmd Ian Campbell
     [not found]   ` <01C96D24-A13F-46A6-A8A9-5C04E2E199AF@citrix.com>
2015-07-16  7:59     ` Dave Scott
2015-07-16  8:35       ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 10/15] tools: Refactor hypercall calling wrappers into libxencall Ian Campbell
2015-07-15 15:46 ` Ian Campbell [this message]
2015-07-15 15:47 ` [PATCH XEN v2 12/15] tools: Remove xc_map_foreign_batch Ian Campbell
2015-07-15 16:08   ` George Dunlap
2015-07-15 15:47 ` [PATCH XEN v2 13/15] tools: Implement xc_map_foreign_range(s) in terms of common helper Ian Campbell
2015-07-15 15:47 ` [PATCH XEN v2 14/15] tools: Refactor foreign memory mapping into libxenforeignmemory Ian Campbell
2015-07-15 15:47 ` [PATCH XEN v2 15/15] HACK: Add a .config to pull all the right bits Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 1/5] qemu-xen-traditional: Use xentoollog as a separate library Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 2/5] qemu-xen-traditional: Use libxenevtchn Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 3/5] qemu-xen-traditional: Use libxengnttab Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 4/5] qemu-xen-traditional: Add libxencall to rpath-link Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 5/5] qemu-xen-traditional: Add libxenforeignmemory " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 1/5] mini-os: Include libxentoollog with libxc Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 2/5] mini-os: Include libxenevtchn " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 3/5] mini-os: Include libxengnttab " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 4/5] mini-os: Include libxencall " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 5/5] mini-os: Include libxenforeignmemory " Ian Campbell
2015-07-15 15:53 ` [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Andrew Cooper
2015-07-22 11:12   ` Ian Campbell
2015-07-22 12:58     ` Andrew Cooper
2015-07-22 13:05       ` Ian Campbell
2015-07-27  8:57     ` Ian Campbell
2015-09-22 15:03 ` Oldest supported Xen version in upstream QEMU (Was: Re: [Minios-devel] [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries) Ian Campbell
2015-09-22 21:31   ` Stefano Stabellini
2015-09-23  8:29     ` Ian Campbell
2015-09-23 14:09       ` Konrad Rzeszutek Wilk
2015-09-23 14:17         ` Juergen Gross
2015-09-23 14:21           ` Konrad Rzeszutek Wilk
2015-09-23 14:26             ` Ian Campbell
2015-09-23 17:36       ` Stefano Stabellini
2015-09-24  7:15         ` Ian Campbell
2015-09-24  9:03           ` Fabio Fantoni
2015-09-24 19:33           ` Stefano Stabellini
2015-09-24 21:11             ` Ian Campbell
2015-09-24 22:19               ` Stefano Stabellini
2015-09-25  8:27                 ` Ian Campbell
2015-09-25 20:31                   ` Stefano Stabellini
2015-09-24 16:47 ` [Minios-devel] [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436975223-11098-11-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).