aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorRoss Lagerwall <ross.lagerwall@citrix.com>2016-12-12 09:35:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 03:30:30 -0400
commit8b08aec62c247db69f5e2a813912f65a46797fc2 (patch)
treeb4600a96369bb85cdd6735e6db183a170b45ada3 /arch/x86
parent8601537724611b724920fd397cc9fdb181e92ed3 (diff)
xen/setup: Don't relocate p2m over existing one
commit 7ecec8503af37de6be4f96b53828d640a968705f upstream. When relocating the p2m, take special care not to relocate it so that is overlaps with the current location of the p2m/initrd. This is needed since the full extent of the current location is not marked as a reserved region in the e820. This was seen to happen to a dom0 with a large initial p2m and a small reserved region in the middle of the initial p2m. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/xen/setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index f8960fca0827..9f21b0c5945d 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -713,10 +713,9 @@ static void __init xen_reserve_xen_mfnlist(void)
713 size = PFN_PHYS(xen_start_info->nr_p2m_frames); 713 size = PFN_PHYS(xen_start_info->nr_p2m_frames);
714 } 714 }
715 715
716 if (!xen_is_e820_reserved(start, size)) { 716 memblock_reserve(start, size);
717 memblock_reserve(start, size); 717 if (!xen_is_e820_reserved(start, size))
718 return; 718 return;
719 }
720 719
721#ifdef CONFIG_X86_32 720#ifdef CONFIG_X86_32
722 /* 721 /*
@@ -727,6 +726,7 @@ static void __init xen_reserve_xen_mfnlist(void)
727 BUG(); 726 BUG();
728#else 727#else
729 xen_relocate_p2m(); 728 xen_relocate_p2m();
729 memblock_free(start, size);
730#endif 730#endif
731} 731}
732 732