All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix domheap structure allocation when NUMA=on
@ 2009-03-20  5:05 Yang, Xiaowei
  2009-03-20  8:15 ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: Yang, Xiaowei @ 2009-03-20  5:05 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

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@intel.com>

[-- Attachment #2: numa.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

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;
 }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-24 10:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20  5:05 [PATCH] Fix domheap structure allocation when NUMA=on Yang, Xiaowei
2009-03-20  8:15 ` Jan Beulich
2009-03-20  8:34   ` Yang, Xiaowei
2009-03-20  8:47     ` Jan Beulich
2009-03-20  8:56       ` Keir Fraser
2009-03-20  9:27         ` Jan Beulich
2009-03-20  9:32           ` Keir Fraser
2009-03-24 10:48       ` Yang, Xiaowei
2009-03-24 10:55         ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.