a44432b44f
sysemu/numa.h includes hw/boards.h just for the CPUArchId typedef, at the cost of pulling in more than two dozen extra headers indirectly. I could move the typedef from hw/boards.h to qemu/typedefs.h. But it's used in just two headers: boards.h and numa.h. I could move it to another header both its users include. exec/cpu-common.h seems to be the least bad fit. But I'm keeping this simple & stupid: declare the struct tag in numa.h. Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190812052359.30071-24-armbru@redhat.com>
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
#ifndef SYSEMU_NUMA_H
|
|
#define SYSEMU_NUMA_H
|
|
|
|
#include "qemu/bitmap.h"
|
|
#include "sysemu/sysemu.h"
|
|
#include "sysemu/hostmem.h"
|
|
#include "qapi/qapi-types-machine.h"
|
|
#include "exec/cpu-common.h"
|
|
|
|
struct CPUArchId;
|
|
|
|
extern int nb_numa_nodes; /* Number of NUMA nodes */
|
|
extern bool have_numa_distance;
|
|
|
|
struct NodeInfo {
|
|
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 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[]);
|
|
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 struct CPUArchId *slot, DeviceState *dev,
|
|
Error **errp);
|
|
|
|
#endif
|