Re: [PATCH 2/2] qemu: monitor: Properly propagate the 'qemu_id' field through the matcher

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.11.2016 10:51, Peter Krempa wrote:
> Commit 3f71c797689a4a70 added 'qemu_id' field to track the id of the cpu
> as reported by query-cpus. The patch did not include changes necessary
> to propagate the id through the functions matching the data to the
> libvirt cpu structures and thus all vcpus had id 0.
> ---
>  src/qemu/qemu_monitor.c                            |  3 +++
>  .../qemumonitorjson-cpuinfo-ppc64-basic.data       |  8 ++++++++
>  .../qemumonitorjson-cpuinfo-ppc64-hotplug-1.data   | 16 +++++++++++++++
>  .../qemumonitorjson-cpuinfo-ppc64-hotplug-2.data   | 24 ++++++++++++++++++++++
>  .../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data   | 24 ++++++++++++++++++++++
>  .../qemumonitorjson-cpuinfo-ppc64-no-threads.data  |  8 ++++++++
>  ...emumonitorjson-cpuinfo-x86-basic-pluggable.data |  5 +++++
>  .../qemumonitorjson-cpuinfo-x86-full.data          | 11 ++++++++++
>  tests/qemumonitorjsontest.c                        |  3 +++
>  9 files changed, 102 insertions(+)
> 
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index 3ff31e4..3f86887 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -1672,6 +1672,7 @@ qemuMonitorCPUInfoClear(qemuMonitorCPUInfoPtr cpus,
> 
>      for (i = 0; i < ncpus; i++) {
>          cpus[i].id = 0;
> +        cpus[i].qemu_id = -1;
>          cpus[i].socket_id = -1;
>          cpus[i].core_id = -1;
>          cpus[i].thread_id = -1;
> @@ -1729,6 +1730,7 @@ qemuMonitorGetCPUInfoLegacy(struct qemuMonitorQueryCpusEntry *cpuentries,
>          if (i < ncpuentries) {
>              vcpus[i].tid = cpuentries[i].tid;
>              vcpus[i].halted = cpuentries[i].halted;
> +            vcpus[i].qemu_id = cpuentries[i].qemu_id;
>          }
> 
>          /* for legacy hotplug to work we need to fake the vcpu count added by
> @@ -1866,6 +1868,7 @@ qemuMonitorGetCPUInfoHotplug(struct qemuMonitorQueryHotpluggableCpusEntry *hotpl
>              }
>          }
> 
> +        vcpus[anyvcpu].qemu_id = cpuentries[j].qemu_id;
>          vcpus[anyvcpu].tid = cpuentries[j].tid;
>          vcpus[anyvcpu].halted = cpuentries[j].halted;
>      }
Looks good to me. Since presently s390 does only support legacy hotplug
w/o unplug, the second hunk will essentially do the trick.
[...]

Thanks!
-- 

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux