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
Signed-off-by: 's avatarJuergen Gross <>
Reviewed-by: 's avatarDaniel Kiper <>
Tested-by: Hans van Kranenburg's avatarHans van Kranenburg <>

Origin: upstream,
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];
return (grub_addr_t) ptr >> GRUB_XEN_LOG_PAGE_SIZE;
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