1e35704baSEduardo Habkost #ifndef SYSEMU_NUMA_H 2e35704baSEduardo Habkost #define SYSEMU_NUMA_H 3e35704baSEduardo Habkost 4e35704baSEduardo Habkost #include "qemu/bitmap.h" 5e35704baSEduardo Habkost #include "sysemu/sysemu.h" 6e35704baSEduardo Habkost #include "sysemu/hostmem.h" 757924bcdSIgor Mammedov #include "hw/boards.h" 8e35704baSEduardo Habkost 9e35704baSEduardo Habkost extern int nb_numa_nodes; /* Number of NUMA nodes */ 100f203430SHe Chen extern bool have_numa_distance; 11e35704baSEduardo Habkost 12*aec90730SEric Blake struct NodeInfo { 13e35704baSEduardo Habkost uint64_t node_mem; 14e35704baSEduardo Habkost struct HostMemoryBackend *node_memdev; 15e35704baSEduardo Habkost bool present; 160f203430SHe Chen uint8_t distance[MAX_NODES]; 173bfe5716SLaurent Vivier }; 18fa9ea81dSBharata B Rao 1931959e82SVadim Galitsyn struct NumaNodeMem { 2031959e82SVadim Galitsyn uint64_t node_mem; 2131959e82SVadim Galitsyn uint64_t node_plugged_mem; 2231959e82SVadim Galitsyn }; 2331959e82SVadim Galitsyn 24e35704baSEduardo Habkost extern NodeInfo numa_info[MAX_NODES]; 25ea089eebSIgor Mammedov void parse_numa_opts(MachineState *ms); 267a3099fcSIgor Mammedov void numa_complete_configuration(MachineState *ms); 2731959e82SVadim Galitsyn void query_numa_node_mem(NumaNodeMem node_mem[]); 28e35704baSEduardo Habkost extern QemuOptsList qemu_numa_opts; 293bfe5716SLaurent Vivier void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes, 303bfe5716SLaurent Vivier int nb_nodes, ram_addr_t size); 313bfe5716SLaurent Vivier void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes, 323bfe5716SLaurent Vivier int nb_nodes, ram_addr_t size); 33a0ceb640SIgor Mammedov void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp); 34e35704baSEduardo Habkost #endif 35