Philippe Mathieu-Daudé <phi...@linaro.org> writes: > Devices should avoid calling qemu_get_cpu() because this call > doesn't work as expected with heterogeneous machines. Such > devices often iterate over a cluster of CPUs, which the device's > parent has direct access (when creating the child device). > > We can pass QOM as 'link' between objects, but we can't pass an > array of links. Here we exploits QAPI simplicity, by using
Do you mean qdev simplicity? > DEFINE_PROP_ARRAY and a list of strings, each string being the > CPU canonical path in QOM tree (which is constant and unique). > When the device realizes itself, the original CPU pointer is > recovered via a object_resolve_path() call. We have link properties, see DEFINE_PROP_LINK() and qdev_prop_link. Would an array of link properties be feasible here? > Inspired-by: Peter Maydell <peter.mayd...@linaro.org> > Inspired-by: Markus Armbruster <arm...@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > --- > Tested with: > $ make check-qtest-ppc{,64} > $ make check-avocado AVOCADO_TAGS='machine:ppce500 machine:mpc8544ds' > > RFC: See cover > > FIXME: Should we free spin_cpu_list using g_autoptr(QList)?