tools/libxendevicemodel: extract functions and add a compat layer
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 15 Feb 2017 14:44:16 +0000 (14:44 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 23 Feb 2017 11:57:40 +0000 (11:57 +0000)
commit6902cb00e03122811089bec0b089c5a21e2849ae
tree3e85e82a19ed4bb96050340620b9fd637f37b068
parentb108240265deea37601f1a605910069a837da841
tools/libxendevicemodel: extract functions and add a compat layer

This patch extracts all functions resulting in a dm_op hypercall from
libxenctrl and moves them into libxendevicemodel. It also adds a compat
layer into libxenctrl, which can be selected by defining
XC_WANT_COMPAT_DEVICEMODEL_API to 1 before including xenctrl.h.

With this patch the core of libxendevicemodel still uses libxencall to
issue the dm_op hypercalls, but this is done by calling through code that
can be modified on a per-OS basis. A subsequent patch will add a Linux-
specific variant.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
15 files changed:
tools/Makefile
tools/Rules.mk
tools/libs/devicemodel/Makefile
tools/libs/devicemodel/compat.c [new file with mode: 0644]
tools/libs/devicemodel/core.c
tools/libs/devicemodel/include/xendevicemodel.h
tools/libs/devicemodel/libxendevicemodel.map
tools/libs/devicemodel/private.h
tools/libxc/Makefile
tools/libxc/include/xenctrl.h
tools/libxc/include/xenctrl_compat.h
tools/libxc/xc_devicemodel_compat.c [new file with mode: 0644]
tools/libxc/xc_domain.c
tools/libxc/xc_misc.c
tools/libxc/xc_private.c