[PATCH 4/7] qemu: domain: Store 'qomPath' in qemuDomainVcpuPrivate
Ján Tomko
jtomko at redhat.com
Mon Feb 7 16:35:29 UTC 2022
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>
>---
> src/qemu/qemu_domain.c | 3 +++
> src/qemu/qemu_domain.h | 2 ++
> 2 files changed, 5 insertions(+)
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index 14b585c6e9..015f635dc8 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -821,6 +821,7 @@ qemuDomainVcpuPrivateDispose(void *obj)
> g_free(priv->type);
> g_free(priv->alias);
> virJSONValueFree(priv->props);
>+ g_free(priv->qomPath);
> return;
> }
>
>@@ -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;
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220207/bf262408/attachment-0001.sig>
More information about the libvir-list
mailing list