aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorPaul Durrant <paul.durrant@citrix.com>2018-05-17 16:35:53 +0100
committerStefano Stabellini <sstabellini@kernel.org>2018-05-22 11:43:21 -0700
commit58560f2ae71b99d3032432a4a8457bb2cb21bce1 (patch)
tree9fd83c243955977a4185cb76d8a95195c385b045 /hw/char
parent5ee1d999138f17ad54657f1dba6408f6aefc3cc2 (diff)
downloadqemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.zip
qemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.tar.gz
qemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.tar.bz2
xen: remove other open-coded use of libxengnttab
Now that helpers are available in xen_backend, use them throughout all Xen PV backends. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Anthony Perard <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/xen_console.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index bdfaa40..8b4b4bf 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -233,12 +233,11 @@ static int con_initialise(struct XenDevice *xendev)
if (!xendev->dev) {
xen_pfn_t mfn = con->ring_ref;
con->sring = xenforeignmemory_map(xen_fmem, con->xendev.dom,
- PROT_READ|PROT_WRITE,
+ PROT_READ | PROT_WRITE,
1, &mfn, NULL);
} else {
- con->sring = xengnttab_map_grant_ref(xendev->gnttabdev, con->xendev.dom,
- con->ring_ref,
- PROT_READ|PROT_WRITE);
+ con->sring = xen_be_map_grant_ref(xendev, con->ring_ref,
+ PROT_READ | PROT_WRITE);
}
if (!con->sring)
return -1;
@@ -267,7 +266,7 @@ static void con_disconnect(struct XenDevice *xendev)
if (!xendev->dev) {
xenforeignmemory_unmap(xen_fmem, con->sring, 1);
} else {
- xengnttab_unmap(xendev->gnttabdev, con->sring, 1);
+ xen_be_unmap_grant_ref(xendev, con->sring);
}
con->sring = NULL;
}