Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
8 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters