mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
numa: Move NUMA declarations from sysemu.h to numa.h
Not all sysemu.h users need the NUMA declarations, and keeping them in a separate file makes it easier to see what are the interfaces provided by numa.c. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
cd2d554127
commit
e35704ba9c
8 changed files with 34 additions and 19 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "hw/pci/msi.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "kvm_i386.h"
|
||||
#include "hw/xen/xen.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "qemu/config-file.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/range.h"
|
||||
#include "sysemu/numa.h"
|
||||
|
||||
typedef struct pc_dimms_capacity {
|
||||
uint64_t size;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*
|
||||
*/
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/fw-path-provider.h"
|
||||
#include "elf.h"
|
||||
|
|
28
include/sysemu/numa.h
Normal file
28
include/sysemu/numa.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef SYSEMU_NUMA_H
|
||||
#define SYSEMU_NUMA_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qemu/option.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/hostmem.h"
|
||||
|
||||
extern int nb_numa_nodes; /* Number of NUMA nodes */
|
||||
extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
|
||||
* For all nodes, nodeid < max_numa_nodeid
|
||||
*/
|
||||
|
||||
typedef struct node_info {
|
||||
uint64_t node_mem;
|
||||
DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
|
||||
struct HostMemoryBackend *node_memdev;
|
||||
bool present;
|
||||
} NodeInfo;
|
||||
extern NodeInfo numa_info[MAX_NODES];
|
||||
void set_numa_nodes(void);
|
||||
void set_numa_modes(void);
|
||||
void query_numa_node_mem(uint64_t node_mem[]);
|
||||
extern QemuOptsList qemu_numa_opts;
|
||||
int numa_init_func(QemuOpts *opts, void *opaque);
|
||||
|
||||
#endif
|
|
@ -147,24 +147,6 @@ extern int mem_prealloc;
|
|||
*/
|
||||
#define MAX_CPUMASK_BITS 255
|
||||
|
||||
extern int nb_numa_nodes; /* Number of NUMA nodes */
|
||||
extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
|
||||
* For all nodes, nodeid < max_numa_nodeid
|
||||
*/
|
||||
|
||||
typedef struct node_info {
|
||||
uint64_t node_mem;
|
||||
DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
|
||||
struct HostMemoryBackend *node_memdev;
|
||||
bool present;
|
||||
} NodeInfo;
|
||||
extern NodeInfo numa_info[MAX_NODES];
|
||||
void set_numa_nodes(void);
|
||||
void set_numa_modes(void);
|
||||
void query_numa_node_mem(uint64_t node_mem[]);
|
||||
extern QemuOptsList qemu_numa_opts;
|
||||
int numa_init_func(QemuOpts *opts, void *opaque);
|
||||
|
||||
#define MAX_OPTION_ROMS 16
|
||||
typedef struct QEMUOptionRom {
|
||||
const char *name;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "sysemu/char.h"
|
||||
#include "ui/qemu-spice.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qemu/readline.h"
|
||||
#include "ui/console.h"
|
||||
|
|
2
numa.c
2
numa.c
|
@ -22,7 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qom/cpu.h"
|
||||
|
|
1
vl.c
1
vl.c
|
@ -78,6 +78,7 @@ int main(int argc, char **argv)
|
|||
#include "monitor/monitor.h"
|
||||
#include "ui/console.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "exec/gdbstub.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "sysemu/char.h"
|
||||
|
|
Loading…
Reference in a new issue