These are taken wholesale pretty much directly from the libxc
versions. Those libxc ones will be deleted later in the series in
order to make the transition simpler for QEMU upstream.
Changes compared with libxc are:
- All functions take a xendevicemodel_handle instead of an
xc_interface+domid, and are named xendevicemodel_* not xc_hvm_*.
- ioservid_t becomes uint16_t (since hvm_op.h is not exposed to
users of this library)
- ioserv's which handle buffered ioreq must always use the ATOMIC
variant, LEGACY is not exposed (since anything being ported to
this library should be adjusted to be atomic at the same time)
- a few integer params which were actually booleans converted to
bool.
- Internally use xencall_alloc_buffer directly.
- All always log on failure.
XXX underlying hypercall is not stable. Note this with the version of
@@UNSTABLE. Also in order to build need to define __XEN_TOOLS__,
use a separate source file to avoid accidentally poluting the
stable bits of the library.
TBD replace hypercall with a stable variant and move to ioreq.c +
version as @@1.0
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Paul Durrant <paul.durrant@citrix.com>