aboutsummaryrefslogtreecommitdiffstats
path: root/main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2019-04-03 16:07:12 +0200
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-04-05 06:53:00 +0000
commitc40e9ceff34231100ff228d3015900e945727a7f (patch)
treec1960c097ca33cac4b1718485144cd5603f6b96a /main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch
parent311f3a86010da63e189043d072f745b478b45309 (diff)
downloadaports-c40e9ceff34231100ff228d3015900e945727a7f.tar.bz2
aports-c40e9ceff34231100ff228d3015900e945727a7f.tar.xz
main/grub: add xen pvh support
* Backport xen_pvh patches from grub master branch * Adds grub-i386-xen_pvh.bin to the grub-xenhost package
Diffstat (limited to 'main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch')
-rw-r--r--main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch b/main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch
new file mode 100644
index 0000000000..aa0de2c411
--- /dev/null
+++ b/main/grub/0007-xen-Modify-grub_xen_ptr2mfn-for-Xen-PVH.patch
@@ -0,0 +1,33 @@
+From 9db97a1c63053bc376419e913a19f9f99a3f7b7d Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Fri, 7 Dec 2018 13:11:35 +0100
+Subject: [PATCH 07/20] 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>
+(cherry picked from commit 3b8d09c7742a1890eadad6987852c82947ea5d4a)
+---
+ grub-core/kern/xen/init.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c
+index 10007b411..a23dad633 100644
+--- a/grub-core/kern/xen/init.c
++++ b/grub-core/kern/xen/init.c
+@@ -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
+ }
+
+--
+2.21.0
+