]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
tools: Do not expose all builds to unstable hypercall APIs by default
authorIan Campbell <ian.campbell@citrix.com>
Wed, 3 Feb 2016 16:10:49 +0000 (16:10 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 4 Feb 2016 15:20:40 +0000 (15:20 +0000)
commit3237645813d768e0f766cb53aa376d8bab106375
treef4963fc456d9438db490d13dbdd99c963b263324
parenta16f286fea90c8461650fd16348577c5b6bfbb2b
tools: Do not expose all builds to unstable hypercall APIs by default

Currently __XEN_TOOLS__ is defined in the global CFLAGS used for tools
builds, exposing them all to the various unstable hypercall interfaces.

However there are places where we do not want this (in particular all
the stable libraries now under tools/libs), and there is a risk of
such uses slipping in unnoticed (currently there are none, but I
tripped over the mixed nature of the HVMOPs just now in some new code
I was putting together).

Instead only define __XEN_TOOLS__ for things which explicitly want the
unstable APIs. The vast majority of these are consumers of libxenctrl,
which have opted into unstable interfaces by using libxenctrl already,
so adding -D__XEN_TOOLS__ to CFLAGS_libxenctrl covers these without
needing to patch the dozen or so tools manually.

The libxc build itself, which doesn't use CFLAGS_libxenctrl, now needs
the define too. As does gdbsx's own low level hypercall binding
library xg.

hvmloader no longer needs to undefine the symbol.

The ocaml evtchn bindings don't actually need sysctl.h and therefore
don't actually need __XEN_TOOLS__ either.

qemu-xen-traditional doesn't use CFLAGS_libxenctrl and so we pass the
define there (via --extra-cflags) too.

Having removed __XEN_TOOLS__ replace it with
__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ so that in
tree code is always using the latest APIs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/Makefile
tools/Rules.mk
tools/debugger/gdbsx/xg/Makefile
tools/firmware/hvmloader/Makefile
tools/libxc/Makefile
tools/ocaml/libs/eventchn/xeneventchn_stubs.c