]> xenbits.xensource.com Git - people/hx242/xen.git/commitdiff
x86/numa: map the pages for memnodemap when there is no directmap
authorHongyan Xia <hongyxia@amazon.com>
Mon, 28 Oct 2019 10:48:50 +0000 (10:48 +0000)
committerHongyan Xia <hongyxia@amazon.com>
Fri, 14 Aug 2020 20:38:33 +0000 (21:38 +0100)
Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
xen/arch/x86/numa.c

index f1066c59c7be578095fa5434662a7b7f91184fc4..c33333838cf06f82fab79a317905e31d42822f4d 100644 (file)
@@ -102,7 +102,8 @@ static int __init allocate_cachealigned_memnodemap(void)
     unsigned long size = PFN_UP(memnodemapsize * sizeof(*memnodemap));
     unsigned long mfn = mfn_x(alloc_boot_pages(size, 1));
 
-    memnodemap = mfn_to_virt(mfn);
+    memnodemap = vmap_contig_pages(_mfn(mfn), size);
+    BUG_ON(!memnodemap);
     mfn <<= PAGE_SHIFT;
     size <<= PAGE_SHIFT;
     printk(KERN_DEBUG "NUMA: Allocated memnodemap from %lx - %lx\n",