Re: [Qemu-devel] [PATCH] NUMA: Replace MAX_NODES with nb_numa_nodes in for loop

2017-08-22 Thread Philippe Mathieu-Daudé
On 08/22/2017 10:20 AM, Igor Mammedov wrote: On Tue, 22 Aug 2017 15:45:36 +0800 Dou Liyang wrote: In QEMU, the number of the NUMA nodes is determined by parse_numa_opts(). Then, QEMU uses it for iteration, for example: for (i = 0; i < nb_numa_nodes; i++)

Re: [Qemu-devel] [PATCH] NUMA: Replace MAX_NODES with nb_numa_nodes in for loop

2017-08-22 Thread Igor Mammedov
On Tue, 22 Aug 2017 15:45:36 +0800 Dou Liyang wrote: > In QEMU, the number of the NUMA nodes is determined by parse_numa_opts(). > Then, QEMU uses it for iteration, for example: > for (i = 0; i < nb_numa_nodes; i++) > > However, in

[Qemu-devel] [PATCH] NUMA: Replace MAX_NODES with nb_numa_nodes in for loop

2017-08-22 Thread Dou Liyang
In QEMU, the number of the NUMA nodes is determined by parse_numa_opts(). Then, QEMU uses it for iteration, for example: for (i = 0; i < nb_numa_nodes; i++) However, in memory_region_allocate_system_memory(), it uses MAX_NODES not nb_numa_nodes. So, replace MAX_NODES with nb_numa_nodes to keep