4 #include "qemu/bitmap.h"
5 #include "qapi/qapi-types-machine.h"
6 #include "exec/cpu-common.h"
11 #define NUMA_NODE_UNASSIGNED MAX_NODES
12 #define NUMA_DISTANCE_MIN 10
13 #define NUMA_DISTANCE_DEFAULT 20
14 #define NUMA_DISTANCE_MAX 254
15 #define NUMA_DISTANCE_UNREACHABLE 255
17 extern int nb_numa_nodes
; /* Number of NUMA nodes */
18 extern bool have_numa_distance
;
22 struct HostMemoryBackend
*node_memdev
;
24 uint8_t distance
[MAX_NODES
];
29 uint64_t node_plugged_mem
;
32 extern NodeInfo numa_info
[MAX_NODES
];
34 void set_numa_options(MachineState
*ms
, NumaOptions
*object
, Error
**errp
);
35 void parse_numa_opts(MachineState
*ms
);
36 void numa_complete_configuration(MachineState
*ms
);
37 void query_numa_node_mem(NumaNodeMem node_mem
[]);
38 extern QemuOptsList qemu_numa_opts
;
39 void numa_legacy_auto_assign_ram(MachineClass
*mc
, NodeInfo
*nodes
,
40 int nb_nodes
, ram_addr_t size
);
41 void numa_default_auto_assign_ram(MachineClass
*mc
, NodeInfo
*nodes
,
42 int nb_nodes
, ram_addr_t size
);
43 void numa_cpu_pre_plug(const struct CPUArchId
*slot
, DeviceState
*dev
,