Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232095
b: refs/heads/master
c: 8e1b4cf
h: refs/heads/master
i:
  232093: 4732ca7
  232091: ac0e7f5
  232087: 1b0e84b
  232079: 898ec8b
  232063: 3d39104
v: v3
  • Loading branch information
Stefan Bader authored and Konrad Rzeszutek Wilk committed Jan 21, 2011
1 parent 79bd4d0 commit e96d277
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d81c3b9e2e5057c52256e154205143ad4e6e919
refs/heads/master: 8e1b4cf2108488ccfb9a3e7ed7cd85a435e01d4b
20 changes: 19 additions & 1 deletion trunk/arch/x86/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,25 @@ void __init xen_build_dynamic_phys_to_machine(void)
p2m_top[topidx] = mid;
}

p2m_top[topidx][mididx] = &mfn_list[pfn];
/*
* 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];
}

m2p_override_init();
Expand Down

0 comments on commit e96d277

Please sign in to comment.