On Thu, Mar 08, 2018 at 10:33:33AM +0800, Haozhong Zhang wrote:
> Make qmp_pc_dimm_device_list() return sorted by start address
> list of devices so that it could be reused in places that
> would need sorted list*. Reuse existing pc_dimm_built_list()
> to get sorted list.
> 
> While at it hide recursive callbacks from callers, so that:
> 
>   qmp_pc_dimm_device_list(qdev_get_machine(), &list);
> 
> could be replaced with simpler:
> 
>   list = qmp_pc_dimm_device_list();
> 
> * follow up patch will use it in build_srat()
> 
> Signed-off-by: Haozhong Zhang <haozhong.zh...@intel.com>
> Reviewed-by: Igor Mammedov <imamm...@redhat.com>
> ---
>  hw/mem/pc-dimm.c         | 83 
> +++++++++++++++++++++++++-----------------------
>  hw/ppc/spapr.c           |  3 +-

I have used this patch with SPAPR to implement the new device tree property
ibm,dynamic-memory-v2 at http://patchwork.ozlabs.org/patch/882387/

Reviewed-by: Bharata B Rao <bhar...@linux.vnet.ibm.com>


Reply via email to