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: Juergen Gross <jgross@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Tested-by: Hans van Kranenburg <hans@knorrie.org>
This commit is contained in:
parent
bec9edf53f
commit
3b8d09c774
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue