On 13.08.2021 09:26, Wei Chen wrote: >> From: Jan Beulich <jbeul...@suse.com> >> Sent: 2021年8月12日 23:33 >> >> On 11.08.2021 12:23, Wei Chen wrote: >>> --- a/xen/arch/x86/numa.c >>> +++ b/xen/arch/x86/numa.c >>> @@ -270,6 +270,8 @@ void __init numa_initmem_init(unsigned long >> start_pfn, unsigned long end_pfn) >>> /* setup dummy node covering all memory */ >>> memnode_shift = BITS_PER_LONG - 1; >>> memnodemap = _memnodemap; >>> + memnodemapsize = ARRAY_SIZE(_memnodemap); >> >> But this doesn't reflect reality then, does it? We'd rather want to >> set the size to 1, I would think. >> > > Yes, you're right. Actually, we just only used 1 slot. But furthermore, > memnodemap[0] may be set in acpi_scan_nodes, but acpi_scan_nodes doesn't > reset memnodemap when it failed. I think maybe we can add: > memnodemap[0] = 0; > memnodemapsize = 1; > How do you think about it?
Well, yes, if data may have been put there, then resetting of course makes sense. Jan