diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/xen/p2m.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index ddc81a06edb9..fd12d7ce7ff9 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -241,21 +241,15 @@ void __init xen_build_dynamic_phys_to_machine(void) | |||
241 | * As long as the mfn_list has enough entries to completely | 241 | * As long as the mfn_list has enough entries to completely |
242 | * fill a p2m page, pointing into the array is ok. But if | 242 | * fill a p2m page, pointing into the array is ok. But if |
243 | * not the entries beyond the last pfn will be undefined. | 243 | * not the entries beyond the last pfn will be undefined. |
244 | * And guessing that the 'what-ever-there-is' does not take it | ||
245 | * too kindly when changing it to invalid markers, a new page | ||
246 | * is allocated, initialized and filled with the valid part. | ||
247 | */ | 244 | */ |
248 | if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) { | 245 | if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) { |
249 | unsigned long p2midx; | 246 | unsigned long p2midx; |
250 | unsigned long *p2m = extend_brk(PAGE_SIZE, PAGE_SIZE); | 247 | |
251 | p2m_init(p2m); | 248 | p2midx = max_pfn % P2M_PER_PAGE; |
252 | 249 | for ( ; p2midx < P2M_PER_PAGE; p2midx++) | |
253 | for (p2midx = 0; pfn + p2midx < max_pfn; p2midx++) { | 250 | mfn_list[pfn + p2midx] = INVALID_P2M_ENTRY; |
254 | p2m[p2midx] = mfn_list[pfn + p2midx]; | 251 | } |
255 | } | 252 | p2m_top[topidx][mididx] = &mfn_list[pfn]; |
256 | p2m_top[topidx][mididx] = p2m; | ||
257 | } else | ||
258 | p2m_top[topidx][mididx] = &mfn_list[pfn]; | ||
259 | } | 253 | } |
260 | 254 | ||
261 | m2p_override_init(); | 255 | m2p_override_init(); |