aboutsummaryrefslogtreecommitdiff
path: root/hw/char/xen_console.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-01-02 01:13:46 +0000
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-03-07 17:04:30 +0000
commit15e283c5b684c2e502e9327186eb89eb69c68812 (patch)
tree6b60dc50964407859bd048adf923a590f8e89abb /hw/char/xen_console.c
parentf80fad16afa5aebb8cce919e87f6c58fa03d16e6 (diff)
downloadqemu-15e283c5b684c2e502e9327186eb89eb69c68812.zip
qemu-15e283c5b684c2e502e9327186eb89eb69c68812.tar.gz
qemu-15e283c5b684c2e502e9327186eb89eb69c68812.tar.bz2
hw/xen: Add foreignmem operations to allow redirection to internal emulation
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'hw/char/xen_console.c')
-rw-r--r--hw/char/xen_console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index 19ad6c9..e9cef3e 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -237,9 +237,9 @@ static int con_initialise(struct XenLegacyDevice *xendev)
if (!xendev->dev) {
xen_pfn_t mfn = con->ring_ref;
- con->sring = xenforeignmemory_map(xen_fmem, con->xendev.dom,
- PROT_READ | PROT_WRITE,
- 1, &mfn, NULL);
+ con->sring = qemu_xen_foreignmem_map(con->xendev.dom, NULL,
+ PROT_READ | PROT_WRITE,
+ 1, &mfn, NULL);
} else {
con->sring = xen_be_map_grant_ref(xendev, con->ring_ref,
PROT_READ | PROT_WRITE);
@@ -269,7 +269,7 @@ static void con_disconnect(struct XenLegacyDevice *xendev)
if (con->sring) {
if (!xendev->dev) {
- xenforeignmemory_unmap(xen_fmem, con->sring, 1);
+ qemu_xen_foreignmem_unmap(con->sring, 1);
} else {
xen_be_unmap_grant_ref(xendev, con->sring, con->ring_ref);
}