mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 05:50:37 +00:00
f47bd1c839
SPAPR is the last user of numa_get_node() and a bunch of supporting code to maintain numa_info[x].addr list. Get LMB node id from pc-dimm list, which allows to remove ~80LOC maintaining dynamic address range lookup list. It also removes pc-dimm dependency on numa_[un]set_mem_node_id() and makes pc-dimms a sole source of information about which node it belongs to and removes duplicate data from global numa_info. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
35 lines
999 B
C
35 lines
999 B
C
#ifndef SYSEMU_NUMA_H
|
|
#define SYSEMU_NUMA_H
|
|
|
|
#include "qemu/bitmap.h"
|
|
#include "qemu/option.h"
|
|
#include "sysemu/sysemu.h"
|
|
#include "sysemu/hostmem.h"
|
|
#include "hw/boards.h"
|
|
|
|
extern int nb_numa_nodes; /* Number of NUMA nodes */
|
|
extern bool have_numa_distance;
|
|
|
|
struct node_info {
|
|
uint64_t node_mem;
|
|
struct HostMemoryBackend *node_memdev;
|
|
bool present;
|
|
uint8_t distance[MAX_NODES];
|
|
};
|
|
|
|
struct NumaNodeMem {
|
|
uint64_t node_mem;
|
|
uint64_t node_plugged_mem;
|
|
};
|
|
|
|
extern NodeInfo numa_info[MAX_NODES];
|
|
void parse_numa_opts(MachineState *ms);
|
|
void query_numa_node_mem(NumaNodeMem node_mem[]);
|
|
extern QemuOptsList qemu_numa_opts;
|
|
void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
|
|
int nb_nodes, ram_addr_t size);
|
|
void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
|
|
int nb_nodes, ram_addr_t size);
|
|
void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp);
|
|
#endif
|