diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2015-06-29 13:50:25 +0530 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2015-07-03 17:47:58 -0300 |
commit | fa9ea81d15d459f6c4a39d77ae680af94cebd65e (patch) | |
tree | 711ee24df5c485f58188adabb50a6265f00a025e /include/sysemu/numa.h | |
parent | 8e23184b6b2f8426041854b18fb56a3ff197d5a0 (diff) |
numa,pc-dimm: Store pc-dimm memory information in numa_info
Start storing the (start_addr, end_addr) of the pc-dimm memory
in corresponding numa_info[node] so that this information can be used
to lookup node by address.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/sysemu/numa.h')
-rw-r--r-- | include/sysemu/numa.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h index 6523b4d7f9..7176364062 100644 --- a/include/sysemu/numa.h +++ b/include/sysemu/numa.h @@ -10,16 +10,26 @@ extern int nb_numa_nodes; /* Number of NUMA nodes */ +struct numa_addr_range { + ram_addr_t mem_start; + ram_addr_t mem_end; + QLIST_ENTRY(numa_addr_range) entry; +}; + typedef struct node_info { uint64_t node_mem; DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS); struct HostMemoryBackend *node_memdev; bool present; + QLIST_HEAD(, numa_addr_range) addr; /* List to store address ranges */ } NodeInfo; + extern NodeInfo numa_info[MAX_NODES]; void parse_numa_opts(MachineClass *mc); void numa_post_machine_init(void); void query_numa_node_mem(uint64_t node_mem[]); extern QemuOptsList qemu_numa_opts; +void numa_set_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node); +void numa_unset_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node); #endif |