tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn.
authorIan Campbell <ian.campbell@citrix.com>
Mon, 1 Jun 2015 15:20:09 +0000 (16:20 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 12:21:07 +0000 (12:21 +0000)
commitb7f76a699dcfadc0a52ab45b33cc72dbf3a69e7b
tree96f26c5618463e0f491591b930cb3fd669177271
parent97d9bc6ca610b9b3a3306fe25344deb88dff189f
tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn.

libxenevtchn will provide a stable API and ABI for accessing the
evtchn device.

The functions are moved into the xenevtchn namespace to make a clean
break from libxc and avoid ambiguity regarding which interfaces are
stable.

All in-tree users are updated to use the new names.

Upon request (via #define XC_WANT_COMPAT_EVTCHN_API) libxenctrl will
provide a compat API for the old names. This is used by qemu-xen for
the time being. qemu-xen-traditional is updated in lockstep.

This leaves a few event channel related functions which go via privcmd
(EVTCHNOP) rather than ioctls on the /dev/xen/evtchn device in
libxenctrl. Specifically:

 - xc_evtchn_alloc_unbound
 - xc_evtchn_reset
 - xc_evtchn_status

Note that xc_evtchn_alloc_unbound's functionality is also provided by
xenevtchn_bind_unbound_port() (née xc_evtchn_bind_unbound_port) and is
probably redundant.

These functions do not appear to be needed by qemu-dm, qemu-pv
(provision of device model to HVM guests and PV backends respectively)
or by libvchan suggesting they are not needed by non-toolstack uses of
event channels. QEMU does use these in hw/xenpv/xen_domainbuild.c but
that is a "toolstack use".

The new library uses a version script to ensure that only expected
symbols are exported and to version them such that ABI guarantees can
be kept in the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- updated MINIOS_UPSTREAM_REVISION and QEMU_TRADITIONAL_REVISION ]
62 files changed:
.gitignore
Config.mk
stubdom/Makefile
tools/Makefile
tools/Rules.mk
tools/console/Makefile
tools/console/daemon/io.c
tools/libs/Makefile
tools/libs/evtchn/Makefile [new file with mode: 0644]
tools/libs/evtchn/core.c [new file with mode: 0644]
tools/libs/evtchn/freebsd.c [new file with mode: 0644]
tools/libs/evtchn/include/xenevtchn.h [new file with mode: 0644]
tools/libs/evtchn/libxenevtchn.map [new file with mode: 0644]
tools/libs/evtchn/linux.c [new file with mode: 0644]
tools/libs/evtchn/minios.c [new file with mode: 0644]
tools/libs/evtchn/netbsd.c [new file with mode: 0644]
tools/libs/evtchn/private.h [new file with mode: 0644]
tools/libs/evtchn/solaris.c [new file with mode: 0644]
tools/libs/toollog/include/xentoollog.h
tools/libs/toollog/xtl_core.c
tools/libs/toollog/xtl_logger_stdio.c
tools/libvchan/Makefile
tools/libvchan/init.c
tools/libvchan/io.c
tools/libvchan/libxenvchan.h
tools/libxc/Makefile
tools/libxc/include/xenctrl.h
tools/libxc/include/xenctrl_compat.h [new file with mode: 0644]
tools/libxc/include/xenguest.h
tools/libxc/xc_evtchn_compat.c [new file with mode: 0644]
tools/libxc/xc_freebsd_osdep.c
tools/libxc/xc_linux_osdep.c
tools/libxc/xc_minios.c
tools/libxc/xc_netbsd.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h
tools/libxc/xc_solaris.c
tools/libxc/xc_suspend.c
tools/libxl/Makefile
tools/libxl/libxl.c
tools/libxl/libxl_dom_suspend.c
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h
tools/misc/Makefile
tools/misc/xen-hptool.c
tools/misc/xen-lowmemd.c
tools/ocaml/libs/eventchn/Makefile
tools/ocaml/libs/eventchn/xeneventchn_stubs.c
tools/python/setup.py
tools/tests/xen-access/Makefile
tools/tests/xen-access/xen-access.c
tools/xcutils/Makefile
tools/xenmon/Makefile
tools/xenmon/xenbaked.c
tools/xenpaging/Makefile
tools/xenpaging/xenpaging.c
tools/xenpaging/xenpaging.h
tools/xenstore/Makefile
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_domain.c
tools/xentrace/Makefile
tools/xentrace/xentrace.c