Commit 8ede54c3 authored by Juergen Gross's avatar Juergen Gross Committed by Colin Watson

xen: Modify grub_xen_ptr2mfn() for Xen PVH

grub_xen_ptr2mfn() returns the machine frame number for a given pointer
value. For Xen-PVH guests this is just the PFN. Add the PVH specific
variant.
Signed-off-by: 's avatarJuergen Gross <jgross@suse.com>
Reviewed-by: 's avatarDaniel Kiper <daniel.kiper@oracle.com>
Tested-by: Hans van Kranenburg's avatarHans van Kranenburg <hans@knorrie.org>

Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=3b8d09c7742a1890eadad6987852c82947ea5d4a
Bug-Debian: https://bugs.debian.org/776450
Last-Update: 2019-01-07

Patch-Name: xen-pvh-ptr2mfn.patch
parent 731bd3bb
......@@ -45,6 +45,8 @@ grub_xen_ptr2mfn (void *ptr)
grub_xen_mfn_t *mfn_list =
(grub_xen_mfn_t *) grub_xen_start_page_addr->mfn_list;
return mfn_list[(grub_addr_t) ptr >> GRUB_XEN_LOG_PAGE_SIZE];
#else
return (grub_addr_t) ptr >> GRUB_XEN_LOG_PAGE_SIZE;
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment