[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Fix domheap structure allocation when NUMA=on
DIRECTMAP_VIRT_END can't be passed to virt_to_mfn(), as it's just beyond direct map boundary and triggers ASSERT very early at boot time. Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx> diff -r 78ed606cb1ab xen/common/page_alloc.c --- a/xen/common/page_alloc.c Thu Mar 19 10:57:23 2009 +0800 +++ b/xen/common/page_alloc.c Thu Mar 19 23:01:32 2009 +0800 @@ -293,7 +297,7 @@ static unsigned long init_node_heap(int } #ifdef DIRECTMAP_VIRT_END else if ( nr >= needed && - mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END) ) + mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE) ) { _heap[node] = mfn_to_virt(mfn); avail[node] = mfn_to_virt(mfn + needed) - sizeof(**avail) * NR_ZONES; diff -r 78ed606cb1ab xen/include/asm-x86/x86_64/page.h --- a/xen/include/asm-x86/x86_64/page.h Thu Mar 19 10:57:23 2009 +0800 +++ b/xen/include/asm-x86/x86_64/page.h Thu Mar 19 23:00:26 2009 +0800 @@ -40,7 +40,7 @@ static inline unsigned long __virt_to_ma ASSERT(va >= XEN_VIRT_START); ASSERT(va < DIRECTMAP_VIRT_END); ASSERT((va < XEN_VIRT_END) || (va >= DIRECTMAP_VIRT_START)); - if ( va > DIRECTMAP_VIRT_START ) + if ( va >= DIRECTMAP_VIRT_START ) return va - DIRECTMAP_VIRT_START; return va - XEN_VIRT_START + xen_phys_start; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |