aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/numa.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/numa.h')
-rw-r--r--include/sysemu/numa.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
index 7a4ce89765..ae9c41d02b 100644
--- a/include/sysemu/numa.h
+++ b/include/sysemu/numa.h
@@ -14,9 +14,6 @@ struct CPUArchId;
#define NUMA_DISTANCE_MAX 254
#define NUMA_DISTANCE_UNREACHABLE 255
-extern int nb_numa_nodes; /* Number of NUMA nodes */
-extern bool have_numa_distance;
-
struct NodeInfo {
uint64_t node_mem;
struct HostMemoryBackend *node_memdev;
@@ -29,12 +26,22 @@ struct NumaNodeMem {
uint64_t node_plugged_mem;
};
-extern NodeInfo numa_info[MAX_NODES];
+struct NumaState {
+ /* Number of NUMA nodes */
+ int num_nodes;
+
+ /* Allow setting NUMA distance for different NUMA nodes */
+ bool have_numa_distance;
+
+ /* NUMA nodes information */
+ NodeInfo nodes[MAX_NODES];
+};
+typedef struct NumaState NumaState;
void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp);
void parse_numa_opts(MachineState *ms);
void numa_complete_configuration(MachineState *ms);
-void query_numa_node_mem(NumaNodeMem node_mem[]);
+void query_numa_node_mem(NumaNodeMem node_mem[], MachineState *ms);
extern QemuOptsList qemu_numa_opts;
void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
int nb_nodes, ram_addr_t size);