From: Hongyan Xia Date: Mon, 28 Oct 2019 10:48:50 +0000 (+0000) Subject: x86/numa: map the pages for memnodemap when there is no directmap X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d78c35521b8096899af693684fbfea86f619db43;p=people%2Fhx242%2Fxen.git x86/numa: map the pages for memnodemap when there is no directmap Signed-off-by: Hongyan Xia --- diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c index f1066c59c7..c33333838c 100644 --- a/xen/arch/x86/numa.c +++ b/xen/arch/x86/numa.c @@ -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",