aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2016-11-18 12:02:54 +0100
committerEduardo Habkost <ehabkost@redhat.com>2017-01-12 15:51:36 -0200
commitcdda2018e3b9ce0c18938767dfdb1e05a05b67ca (patch)
treec63be6fa7675181574676569d5fc21a88069d115 /include
parent410e98146ffde201ab4c778823ac8beaa74c4c3f (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/numa.h2
-rw-r--r--include/sysemu/sysemu.h7
2 files changed, 1 insertions, 8 deletions
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
index 4da808a6e9..8f09dcf918 100644
--- a/include/sysemu/numa.h
+++ b/include/sysemu/numa.h
@@ -17,7 +17,7 @@ struct numa_addr_range {
typedef struct node_info {
uint64_t node_mem;
- DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
+ unsigned long *node_cpu;
struct HostMemoryBackend *node_memdev;
bool present;
QLIST_HEAD(, numa_addr_range) addr; /* List to store address ranges */
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 66c6f1577e..cccde56454 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -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;