xen: Use correctly the Xen memory terminologies
[firefly-linux-kernel-4.4.55.git] / drivers / tty / hvc / hvc_xen.c
index a9d837f83ce832539a442643f10ec4221d0fa117..efe5124a368de16ddcd1cf204d8ec008fb3f637f 100644 (file)
@@ -265,7 +265,8 @@ static int xen_pv_console_init(void)
                return 0;
        }
        info->evtchn = xen_start_info->console.domU.evtchn;
-       info->intf = mfn_to_virt(xen_start_info->console.domU.mfn);
+       /* GFN == MFN for PV guest */
+       info->intf = gfn_to_virt(xen_start_info->console.domU.mfn);
        info->vtermno = HVC_COOKIE;
 
        spin_lock(&xencons_lock);
@@ -390,7 +391,7 @@ static int xencons_connect_backend(struct xenbus_device *dev,
        if (IS_ERR(info->hvc))
                return PTR_ERR(info->hvc);
        if (xen_pv_domain())
-               mfn = virt_to_mfn(info->intf);
+               mfn = virt_to_gfn(info->intf);
        else
                mfn = __pa(info->intf) >> PAGE_SHIFT;
        ret = gnttab_alloc_grant_references(1, &gref_head);