[libvirt] [PATCH] qemu: monitor: Note change in output of query-cpus-fast

Peter Krempa posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/4bf4a5134069c06ba2aa2e975db16d992930eaa7.1531132429.git.pkrempa@redhat.com
Test syntax-check passed
src/qemu/qemu_monitor_json.c | 3 +++
1 file changed, 3 insertions(+)
[libvirt] [PATCH] qemu: monitor: Note change in output of query-cpus-fast
Posted by Peter Krempa 5 years, 9 months ago
We did not use the field that has changed but note it in the code which
extracts the data for future reference. Especially since there is an
example of the output.

https://bugzilla.redhat.com/show_bug.cgi?id=1598829

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_monitor_json.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 3e90279b71..41abb920ab 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1645,6 +1645,9 @@ qemuMonitorJSONExtractCPUArchInfo(virJSONValuePtr jsoncpu,
  *    ...},
  *    {...}
  *  ]
+ *
+ *  Note that since QEMU 2.13.0 the "arch" output member of the
+ *  "query-cpus-fast" command is replaced by "target".
  */
 static int
 qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: monitor: Note change in output of query-cpus-fast
Posted by Daniel P. Berrangé 5 years, 9 months ago
On Mon, Jul 09, 2018 at 12:33:49PM +0200, Peter Krempa wrote:
> We did not use the field that has changed but note it in the code which
> extracts the data for future reference. Especially since there is an
> example of the output.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1598829
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  src/qemu/qemu_monitor_json.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
> index 3e90279b71..41abb920ab 100644
> --- a/src/qemu/qemu_monitor_json.c
> +++ b/src/qemu/qemu_monitor_json.c
> @@ -1645,6 +1645,9 @@ qemuMonitorJSONExtractCPUArchInfo(virJSONValuePtr jsoncpu,
>   *    ...},
>   *    {...}
>   *  ]
> + *
> + *  Note that since QEMU 2.13.0 the "arch" output member of the
> + *  "query-cpus-fast" command is replaced by "target".
>   */
>  static int
>  qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,

This method calls  qemuMonitorJSONExtractCPUArchInfo(), which does

    const char *arch = virJSONValueObjectGetString(jsoncpu, "arch");

So it seems like "arch" is used to me and needs switching to "target"
in new QEMU.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: monitor: Note change in output of query-cpus-fast
Posted by Peter Krempa 5 years, 9 months ago
On Mon, Jul 09, 2018 at 11:37:32 +0100, Daniel Berrange wrote:
> On Mon, Jul 09, 2018 at 12:33:49PM +0200, Peter Krempa wrote:
> > We did not use the field that has changed but note it in the code which
> > extracts the data for future reference. Especially since there is an
> > example of the output.
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=1598829
> > 
> > Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> > ---
> >  src/qemu/qemu_monitor_json.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
> > index 3e90279b71..41abb920ab 100644
> > --- a/src/qemu/qemu_monitor_json.c
> > +++ b/src/qemu/qemu_monitor_json.c
> > @@ -1645,6 +1645,9 @@ qemuMonitorJSONExtractCPUArchInfo(virJSONValuePtr jsoncpu,
> >   *    ...},
> >   *    {...}
> >   *  ]
> > + *
> > + *  Note that since QEMU 2.13.0 the "arch" output member of the
> > + *  "query-cpus-fast" command is replaced by "target".
> >   */
> >  static int
> >  qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
> 
> This method calls  qemuMonitorJSONExtractCPUArchInfo(), which does
> 
>     const char *arch = virJSONValueObjectGetString(jsoncpu, "arch");
> 
> So it seems like "arch" is used to me and needs switching to "target"
> in new QEMU.

Sigh, yes ... I totally missed qemuMonitorJSONExtractCPUArchInfo. V2
will contain the actuall fix.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list