mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
8e23184b6b
commit
fa9ea81d15
3 changed files with 40 additions and 0 deletions
|
@ -97,6 +97,7 @@ void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms,
|
|||
|
||||
memory_region_add_subregion(&hpms->mr, addr - hpms->base, mr);
|
||||
vmstate_register_ram(mr, dev);
|
||||
numa_set_mem_node_id(addr, memory_region_size(mr), dimm->node);
|
||||
|
||||
out:
|
||||
error_propagate(errp, local_err);
|
||||
|
@ -105,6 +106,9 @@ out:
|
|||
void pc_dimm_memory_unplug(DeviceState *dev, MemoryHotplugState *hpms,
|
||||
MemoryRegion *mr)
|
||||
{
|
||||
PCDIMMDevice *dimm = PC_DIMM(dev);
|
||||
|
||||
numa_unset_mem_node_id(dimm->addr, memory_region_size(mr), dimm->node);
|
||||
memory_region_del_subregion(&hpms->mr, mr);
|
||||
vmstate_unregister_ram(mr, dev);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue