]> git.proxmox.com Git - mirror_qemu.git/commit - numa.c
numa: API to lookup NUMA node by address
authorBharata B Rao <bharata@linux.vnet.ibm.com>
Mon, 29 Jun 2015 08:20:27 +0000 (13:50 +0530)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 3 Jul 2015 20:47:58 +0000 (17:47 -0300)
commite75e2a14d5c13ad38dcf72b69922dee2dafbb0d0
tree5aaa6669c9215fef99588d77490cdc211c044d63
parentabafabd8c982e875d60a10d37f0b91cff1003c55
numa: API to lookup NUMA node by address

Introduce an API numa_get_node(ram_addr_t addr, Error **errp) that
returns the NUMA node to which the given address belongs to. This
API works uniformly for both boot time as well as hotplugged memory.

This API is needed by sPAPR PowerPC to support
ibm,dynamic-reconfiguration-memory device tree node which is needed for
memory hotplug.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
include/sysemu/numa.h
numa.c