On Wed, 18 Oct 2017 16:29:38 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:
> On 18/10/2017 16:26, Igor Mammedov wrote: > >> I guess query-hotpluggable-cpus could also grow a first-cpu-index in the > >> returned data. > > > > I guess query-cpus can/does provide cpu-index already, > > for query-hotpluggable-cpus it would depend in what's shown there > > (would work fro x86/arm/s390 as they publish there CPUState based objects, > > but spapr puts cores there which themselves do not have cpu-index, > > their children do though) > > Yeah, that's why I put "first-cpu-index". The idea is that indices go > from first-cpu-index to first-cpu-index + vcpus-count - 1. yep, so far it's so. we can also add optional extra entries there for each thread like this: Hotpluggable CPUs: type: "power8_v2.0-spapr-cpu-core" vcpus_count: "1" qom_path: "/machine/unattached/device[0]" children threads: /machine/unattached/device[0]/thread[0] /machine/unattached/device[0]/thread[1] CPUInstance Properties: core-id: "0" or ignore high level query-hotpluggable-cpus and use existing query-cpus which already provides qom path to threads and replace of cpu-index based monitor commands with qom path based ones. (though it won't change fact that both are owned by QEMU) > Paolo