]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/char/xen_console.c
xen: Switch uses of xc_map_foreign_range into xc_map_foreign_pages
[mirror_qemu.git] / hw / char / xen_console.c
index ac1b32443260949fbe4a1222038e199e70dc76ab..3e8a57b4f7997bbce5d811194196281a78db99ec 100644 (file)
@@ -228,10 +228,10 @@ static int con_initialise(struct XenDevice *xendev)
        con->buffer.max_capacity = limit;
 
     if (!xendev->dev) {
-        con->sring = xc_map_foreign_range(xen_xc, con->xendev.dom,
-                                          XC_PAGE_SIZE,
-                                          PROT_READ|PROT_WRITE,
-                                          con->ring_ref);
+        xen_pfn_t mfn = con->ring_ref;
+        con->sring = xc_map_foreign_pages(xen_xc, con->xendev.dom,
+                                         PROT_READ|PROT_WRITE,
+                                         &mfn, 1);
     } else {
         con->sring = xengnttab_map_grant_ref(xendev->gnttabdev, con->xendev.dom,
                                              con->ring_ref,