Il 19/02/2014 10:50, Igor Mammedov ha scritto:
> + numa_info[nodenr].node_mem = object_property_get_int(o, "size",
NULL);
> + numa_info[nodenr].node_memdev = MEMORY_BACKEND(o);
if you make numa_info QOM object node_memdev link<> property,
then above hunk could be replaced with just setting link.
And node_mem could be replaced with readonly property that reads size
directly from memdev avoiding data duplication.
As side-effect it numa_info will also become accessible for introspection
using QOM interface. Something like:
qom-list /machine/memory-node[X]
qom-get /machine/memory-node[X]/memory_size
I agree, but I think we can do it on top.
Paolo