From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 2/2] tools: Do not expose all builds to unstable hypercall APIs by default Date: Wed, 3 Feb 2016 17:09:43 +0000 Message-ID: <56B23457.6070500@citrix.com> References: <1454515849-13886-1-git-send-email-ian.campbell@citrix.com> <1454515849-13886-2-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1454515849-13886-2-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , ian.jackson@eu.citrix.com, wei.liu2@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 03/02/16 16:10, Ian Campbell wrote: > 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 Acked-by: Andrew Cooper for the x86 bits.