On Tue, Feb 20, 2018 at 03:35:10PM +0100, Igor Mammedov wrote: > On Mon, 19 Feb 2018 12:12:53 +0530 > Bharata B Rao <bhar...@linux.vnet.ibm.com> wrote: > > > Making pc_dimm_built_list() global allows other parts of QEMU code > > to build and walk through the DIMM list in address-sorted order. > > > > This is needed in the next patch for sPAPR code to create > > ibm,dynamic-memory-v2 device tree property that will have entries > > for populated DIMMs as well as available hotpluggable areas. > > > > CHECK: List of DIMMs is already available via qmp_pc_dimm_device_list(), > maybe make it sorted first and use it? > > (i.e. use pc_dimm_built_list in qmp_pc_dimm_device_list) and hide > recursive callback ugliness from external users. > > MemoryDeviceInfoList *qmp_pc_dimm_device_list(void) { > object_child_foreach(qdev_get_machine(), pc_dimm_built_list, &list); > ... > }
Thanks will attempt this in my next version. Regards, Bharata.