From af2981d75c90111524319d9e0b732cd4b4d4a3ec Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 1 Apr 2017 18:13:17 +0200 Subject: [PATCH] 4.9-stable patches added patches: xen-setup-don-t-relocate-p2m-over-existing-one.patch --- queue-4.9/series | 1 + ...don-t-relocate-p2m-over-existing-one.patch | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 queue-4.9/xen-setup-don-t-relocate-p2m-over-existing-one.patch diff --git a/queue-4.9/series b/queue-4.9/series index 903ada64251..76be2244cf8 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1 +1,2 @@ libceph-force-gfp_noio-for-socket-allocations.patch +xen-setup-don-t-relocate-p2m-over-existing-one.patch diff --git a/queue-4.9/xen-setup-don-t-relocate-p2m-over-existing-one.patch b/queue-4.9/xen-setup-don-t-relocate-p2m-over-existing-one.patch new file mode 100644 index 00000000000..e6a00122e7d --- /dev/null +++ b/queue-4.9/xen-setup-don-t-relocate-p2m-over-existing-one.patch @@ -0,0 +1,49 @@ +From 7ecec8503af37de6be4f96b53828d640a968705f Mon Sep 17 00:00:00 2001 +From: Ross Lagerwall +Date: Mon, 12 Dec 2016 14:35:13 +0000 +Subject: xen/setup: Don't relocate p2m over existing one + +From: Ross Lagerwall + +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 +Reviewed-by: Juergen Gross +Signed-off-by: Juergen Gross +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/setup.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/x86/xen/setup.c ++++ b/arch/x86/xen/setup.c +@@ -713,10 +713,9 @@ static void __init xen_reserve_xen_mfnli + size = PFN_PHYS(xen_start_info->nr_p2m_frames); + } + +- if (!xen_is_e820_reserved(start, size)) { +- memblock_reserve(start, size); ++ memblock_reserve(start, size); ++ if (!xen_is_e820_reserved(start, size)) + return; +- } + + #ifdef CONFIG_X86_32 + /* +@@ -727,6 +726,7 @@ static void __init xen_reserve_xen_mfnli + BUG(); + #else + xen_relocate_p2m(); ++ memblock_free(start, size); + #endif + } + -- 2.47.3