mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
numa: make -numa parser dynamically allocate CPUs masks
so it won't impose an additional limits on max_cpus limits supported by different targets. It removes global MAX_CPUMASK_BITS constant and need to bump it up whenever max_cpus is being increased for a target above MAX_CPUMASK_BITS value. Use runtime max_cpus value instead to allocate sufficiently sized node_cpu bitmasks in numa parser. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1479466974-249781-1-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> [ehabkost: Added asserts to ensure cpu_index < max_cpus] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
410e98146f
commit
cdda2018e3
4 changed files with 15 additions and 20 deletions
|
@ -168,13 +168,6 @@ extern int mem_prealloc;
|
|||
#define MAX_NODES 128
|
||||
#define NUMA_NODE_UNASSIGNED MAX_NODES
|
||||
|
||||
/* The following shall be true for all CPUs:
|
||||
* cpu->cpu_index < max_cpus <= MAX_CPUMASK_BITS
|
||||
*
|
||||
* Note that cpu->get_arch_id() may be larger than MAX_CPUMASK_BITS.
|
||||
*/
|
||||
#define MAX_CPUMASK_BITS 288
|
||||
|
||||
#define MAX_OPTION_ROMS 16
|
||||
typedef struct QEMUOptionRom {
|
||||
const char *name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue