On 12.02.2018 17:50, Dr. David Alan Gilbert wrote: [...] >> diff --git a/hmp.c b/hmp.c >> index a6b94b7..598bfe5 100644 >> --- a/hmp.c >> +++ b/hmp.c >> @@ -410,6 +410,27 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict) >> qapi_free_CpuInfoList(cpu_list); >> } >> >> +void hmp_info_cpus_fast(Monitor *mon, const QDict *qdict) >> +{ >> + CpuInfoFastList *head, *cpu; >> + TargetInfo *target; >> + >> + target = qmp_query_target(NULL); >> + monitor_printf(mon, "CPU architecture is '%s'\n\n", target->arch); >> + qapi_free_TargetInfo(target); >> + >> + head = qmp_query_cpus_fast(NULL); >> + >> + for (cpu = head; cpu; cpu = cpu->next) { >> + monitor_printf(mon, "CPU%" PRId64 "\n", cpu->value->cpu_index); >> + monitor_printf(mon, " thread-id=%" PRId64 "\n", >> cpu->value->thread_id); >> + monitor_printf(mon, " qom-path=%s\n", cpu->value->qom_path); >> + monitor_printf(mon, "\n"); >> + } I started some prototyping in libvirt and stumbled over the changed layout of "info cpus_fast" vs. "info cpus". IMHO it would be better to stick with the original format (one line per CPU). I'll post a v2. >> + >> + qapi_free_CpuInfoFastList(head); >> +} >> + >> static void print_block_info(Monitor *mon, BlockInfo *info, >> BlockDeviceInfo *inserted, bool verbose) >> { >> diff --git a/hmp.h b/hmp.h >> index 1143db4..93fb4e4 100644 >> --- a/hmp.h >> +++ b/hmp.h >> @@ -29,6 +29,7 @@ void hmp_info_migrate_capabilities(Monitor *mon, const >> QDict *qdict); >> void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict); >> void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict); >> void hmp_info_cpus(Monitor *mon, const QDict *qdict); >> +void hmp_info_cpus_fast(Monitor *mon, const QDict *qdict); >> void hmp_info_block(Monitor *mon, const QDict *qdict); >> void hmp_info_blockstats(Monitor *mon, const QDict *qdict); >> void hmp_info_vnc(Monitor *mon, const QDict *qdict); > > For HMP: > > Acked-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > [...]
-- Regards, Viktor Mihajlovski