summaryrefslogtreecommitdiffstats
path: root/hw/char/xen_console.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2016-01-15 13:23:39 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:29:55 -0600
commitff54a98b02bef58fef29676a988998d177628c78 (patch)
treec15317c5ba39c8ac796916a8291a88208ded1d9a /hw/char/xen_console.c
parent8559f718041be51d2c2f1523305af21c348e18cd (diff)
downloadhqemu-ff54a98b02bef58fef29676a988998d177628c78.zip
hqemu-ff54a98b02bef58fef29676a988998d177628c78.tar.gz
xen: Switch to libxengnttab 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 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: 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>
Diffstat (limited to 'hw/char/xen_console.c')
-rw-r--r--hw/char/xen_console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index 63ade33..ac1b324 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -233,7 +233,7 @@ static int con_initialise(struct XenDevice *xendev)
PROT_READ|PROT_WRITE,
con->ring_ref);
} else {
- con->sring = xc_gnttab_map_grant_ref(xendev->gnttabdev, con->xendev.dom,
+ con->sring = xengnttab_map_grant_ref(xendev->gnttabdev, con->xendev.dom,
con->ring_ref,
PROT_READ|PROT_WRITE);
}
@@ -275,7 +275,7 @@ static void con_disconnect(struct XenDevice *xendev)
if (!xendev->dev) {
munmap(con->sring, XC_PAGE_SIZE);
} else {
- xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1);
+ xengnttab_unmap(xendev->gnttabdev, con->sring, 1);
}
con->sring = NULL;
}
OpenPOWER on IntegriCloud