This is a note to let you know that I've just added the patch titled
xen/p2m: Mark INVALID_P2M_ENTRY the mfn_list past max_pfn.
to the 2.6.37-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xen-p2m-mark-invalid_p2m_entry-the-mfn_list-past-max_pfn.patch
and it can be found in the queue-2.6.37 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From cf04d120d9413de581437cf9a29f138ec1178f65 Mon Sep 17 00:00:00 2001
From: Stefan Bader <[email protected]>
Date: Thu, 27 Jan 2011 10:03:14 -0500
Subject: xen/p2m: Mark INVALID_P2M_ENTRY the mfn_list past max_pfn.
From: Stefan Bader <[email protected]>
commit cf04d120d9413de581437cf9a29f138ec1178f65 upstream.
In case the mfn_list does not have enough entries to fill
a p2m page we do not want the entries from max_pfn up to
the boundary to be filled with unknown values. Hence
set them to INVALID_P2M_ENTRY.
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/xen/mmu.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -399,21 +399,15 @@ void __init xen_build_dynamic_phys_to_ma
* As long as the mfn_list has enough entries to completely
* fill a p2m page, pointing into the array is ok. But if
* not the entries beyond the last pfn will be undefined.
- * And guessing that the 'what-ever-there-is' does not take it
- * too kindly when changing it to invalid markers, a new page
- * is allocated, initialized and filled with the valid part.
*/
if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) {
unsigned long p2midx;
- unsigned long *p2m = extend_brk(PAGE_SIZE, PAGE_SIZE);
- p2m_init(p2m);
- for (p2midx = 0; pfn + p2midx < max_pfn; p2midx++) {
- p2m[p2midx] = mfn_list[pfn + p2midx];
- }
- p2m_top[topidx][mididx] = p2m;
- } else
- p2m_top[topidx][mididx] = &mfn_list[pfn];
+ p2midx = max_pfn % P2M_PER_PAGE;
+ for ( ; p2midx < P2M_PER_PAGE; p2midx++)
+ mfn_list[pfn + p2midx] = INVALID_P2M_ENTRY;
+ }
+ p2m_top[topidx][mididx] = &mfn_list[pfn];
}
}
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.37/xen-p2m-correctly-initialize-partial-p2m-leaf.patch
queue-2.6.37/xen-p2m-mark-invalid_p2m_entry-the-mfn_list-past-max_pfn.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable