xen: Switch to libxenevtchn interface for compat shims.
commita2db2a1edd06a50b8a862c654cf993368cf9f1d9
authorIan Campbell <ian.campbell@citrix.com>
Fri, 15 Jan 2016 13:23:38 +0000 (15 13:23 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 26 Jan 2016 17:19:24 +0000 (26 17:19 +0000)
treeeb115de7a6023c6b2bfcf757e09d0ca48ead0a80
parent549e9bcabc2f5b37b0be8c24257e0b527bffb49a
xen: Switch to libxenevtchn interface for compat shims.

In Xen 4.7 we are refactoring parts libxenctrl into a number of
separate libraries which will provide backward and forward API and ABI
compatiblity.

One such library will be libxenevtchn which provides access to event
channels.

In preparation for this switch the compatibility layer in xen_common.h
(which support building with older versions of Xen) to use what will
be the new library API. This means that the evtchn shim will disappear
for versions of Xen which include libxenevtchn.

To simplify things for the <= 4.0.0 support we wrap the int fd in a
malloc(sizeof int) such that the handle is always a pointer. This
leads to less typedef headaches and the need for
XC_HANDLER_INITIAL_VALUE etc for these interfaces.

Note that this patch does not add any support for actually using
libxenevtchn, it just adjusts the existing shims.

Note that xc_evtchn_alloc_unbound functionality remains in libxenctrl,
since that functionality is not exposed by /dev/xen/evtchn.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen/xen_backend.c
include/hw/xen/xen_backend.h
include/hw/xen/xen_common.h
xen-hvm.c