[PATCH 4/7] qemu: domain: Store 'qomPath' in qemuDomainVcpuPrivate

Peter Krempa pkrempa at redhat.com
Mon Feb 7 17:09:10 UTC 2022


On Mon, Feb 07, 2022 at 17:35:29 +0100, Ján Tomko wrote:
> On a Monday in 2022, Peter Krempa wrote:
> > The QOM path will be needed by code which is querying the cpu flags via
> > 'qom-get' and thus needs a valid QOM path to the vCPU.
> > 
> > Add it into the private data and transfer from the queried data.
> > 
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---

[...]

> > @@ -9550,6 +9551,8 @@ qemuDomainRefreshVcpuInfo(virQEMUDriver *driver,
> >         vcpupriv->props = g_steal_pointer(&info[i].props);
> >         vcpupriv->enable_id = info[i].id;
> >         vcpupriv->qemu_id = info[i].qemu_id;
> > +        g_free(vcpupriv->qomPath);
> > +        vcpupriv->qomPath = g_steal_pointer(&info[i].qom_path);
> 
> Since this now copies qom_path, a followup patch to this comment
> in struct _qemuMonitorCPUInfo might be needed:
> 
>     /* internal for use in the matching code */
>     char *qom_path;

I've deleted the comment as part of this patch as the name of the
variable is self-explaining and pushed the series.

Thanks for the review!




More information about the libvir-list mailing list