hw/arm/virt: use machine->possible_cpus for storing possible topology info
commit17d3d0e2d9fc70631de3116eba33e3b2a63887eb
authorIgor Mammedov <imammedo@redhat.com>
Wed, 3 May 2017 12:56:57 +0000 (3 14:56 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 11 May 2017 19:08:48 +0000 (11 16:08 -0300)
tree6d770b8e5943125e1ff61b6e4283525c4d7eecc1
parent46de5913b6779b5cf656f62f945409be00f45b94
hw/arm/virt: use machine->possible_cpus for storing possible topology info

for now precalculate and store mp_afinity in possible_cpus
as ARM cpus don't have socket/core/thread-id properties yet.
In follow patches possible_cpus will be used for storing
and setting NUMA node mapping and replace legacy bitmap
based numa_info[node_id].node_cpu/numa_get_node_for_cpu()

For the lack of better idea, this patch cannibalizes
possible_cpus.cpus[x].props.thread_id so that
*_cpu_index_to_props() callback could return addressable
by props CPU which will be used by machine_set_cpu_numa_node()
in follow up patches to assign a CPU to node. But
cannibalizing is fine for now as that thread_id isn't exposed
to users (no hotpluggable_cpus callback support for ARM yet)
and it will be used only internally until 'device_add cpu'
is supported where we can decide on which properties to use.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1493816238-33120-4-git-send-email-imammedo@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/arm/virt.c