From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Xiaowei" Subject: [PATCH] Fix domheap structure allocation when NUMA=on Date: Fri, 20 Mar 2009 13:05:23 +0800 Message-ID: <49C32413.2030505@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000403000007000106060705" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000403000007000106060705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------000403000007000106060705 Content-Type: text/x-patch; name="numa.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="numa.patch" 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; } --------------000403000007000106060705 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------000403000007000106060705--