summaryrefslogtreecommitdiffstats
path: root/hw/char/xen_console.c
diff options
context:
space:
mode:
authorPaul Durrant2018-05-17 17:35:53 +0200
committerStefano Stabellini2018-05-22 20:43:21 +0200
commit58560f2ae71b99d3032432a4a8457bb2cb21bce1 (patch)
tree9fd83c243955977a4185cb76d8a95195c385b045 /hw/char/xen_console.c
parentxen_disk: remove open-coded use of libxengnttab (diff)
downloadqemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.tar.gz
qemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.tar.xz
qemu-58560f2ae71b99d3032432a4a8457bb2cb21bce1.zip
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/xen_console.c')
-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 bdfaa40ed3..8b4b4bf523 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;
}