First round of patches addressing memory management [1] ugliness.  
During implementation, determined we needed to have some sort of machine 
to physical mapping in addition to the p2m mapping as discussed.


 - dummy call for x86/ia64/ppc

 - move dom0 memory allocation out of setup.c and into construct_dom0(). 
   This makes allocating p2m for dom0 easier.
 - Set dom0->max_pages based on parsed value from dom0_mem cmdline rather
   than defaulting to ~0UL; no need for p2m table to be that big.

 - implement max_mem arch hook for ppc.
 - have dom0 create p2m table

 - implement add/remove page hooks for ppc.
 - change allocate_extents not call add_extent()
 - for each page allocated, call physmap_add_page() to get p2m mapping
 - change pfn2mfn to use p2m table
 - change mfn_to_gmfn() to use p2m table
 - use d->tot_pages rather than extent list to create memory nodes in
   dom0 of tree
 - create machine_to_phys_table() for m2p mapping
 - wire up m2p accessors {get/set}_gpfn_from_mfn()
 - change guest_physmap_{add/remove}_page() to do m2p mapping
 - change mfn_to_gmfn() to use m2p mapping instead of extent calculation
 - add check for page ownership in mfn_to_gmfn()
 - change libxc/powerc64/xc_linux_build() to use populate_physmap hcall
 Note that a 1 line patch to linux is needed to allow populate_physmap 
 to work.  I'll send that seperately from this patchset.

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>
12 files changed, 243 insertions(+), 87 deletions(-)
tools/libxc/powerpc64/xc_linux_build.c |   37 ++++++-
xen/arch/powerpc/domain.c              |   60 ++++++++++++
xen/arch/powerpc/domain_build.c        |   33 ++++--
xen/arch/powerpc/memory.c              |    1 
xen/arch/powerpc/mm.c                  |  157 +++++++++++++++++++++-----------
xen/arch/powerpc/ofd_fixup_memory.c    |    8 -
xen/arch/powerpc/setup.c               |    7 -
xen/common/domctl.c                    |    4 
xen/include/asm-powerpc/domain.h       |    3 
xen/include/asm-powerpc/mm.h           |   14 +-
xen/include/asm-powerpc/shadow.h       |    4 
xen/include/xen/shadow.h               |    2 
Xen-ppc-devel mailing list

Reply via email to