• I
    xen: Switch to libxengnttab interface for compat shims. · c1345a88
    Ian Campbell 提交于
    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 libxengnttab which provides access to grant
    tables.
    
    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 gnttab shim will disappear
    for versions of Xen which include libxengnttab.
    
    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
    libxengnttab, it just adjusts the existing shims.
    Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
    Reviewed-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
    c1345a88
xen_nic.c 13.3 KB