]>
Commit | Line | Data |
---|---|---|
e35704ba EH |
1 | #ifndef SYSEMU_NUMA_H |
2 | #define SYSEMU_NUMA_H | |
3 | ||
e35704ba EH |
4 | #include "qemu/bitmap.h" |
5 | #include "qemu/option.h" | |
6 | #include "sysemu/sysemu.h" | |
7 | #include "sysemu/hostmem.h" | |
57924bcd | 8 | #include "hw/boards.h" |
e35704ba EH |
9 | |
10 | extern int nb_numa_nodes; /* Number of NUMA nodes */ | |
e35704ba | 11 | |
fa9ea81d BR |
12 | struct numa_addr_range { |
13 | ram_addr_t mem_start; | |
14 | ram_addr_t mem_end; | |
15 | QLIST_ENTRY(numa_addr_range) entry; | |
16 | }; | |
17 | ||
e35704ba EH |
18 | typedef struct node_info { |
19 | uint64_t node_mem; | |
20 | DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS); | |
21 | struct HostMemoryBackend *node_memdev; | |
22 | bool present; | |
fa9ea81d | 23 | QLIST_HEAD(, numa_addr_range) addr; /* List to store address ranges */ |
e35704ba | 24 | } NodeInfo; |
fa9ea81d | 25 | |
e35704ba | 26 | extern NodeInfo numa_info[MAX_NODES]; |
57924bcd | 27 | void parse_numa_opts(MachineClass *mc); |
dde11116 | 28 | void numa_post_machine_init(void); |
e35704ba EH |
29 | void query_numa_node_mem(uint64_t node_mem[]); |
30 | extern QemuOptsList qemu_numa_opts; | |
fa9ea81d BR |
31 | void numa_set_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node); |
32 | void numa_unset_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node); | |
e75e2a14 | 33 | uint32_t numa_get_node(ram_addr_t addr, Error **errp); |
e35704ba EH |
34 | |
35 | #endif |