mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemu: domain: Store 'qomPath' in qemuDomainVcpuPrivate
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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
715846b6ea
commit
f0a4951616
@ -821,6 +821,7 @@ qemuDomainVcpuPrivateDispose(void *obj)
|
|||||||
g_free(priv->type);
|
g_free(priv->type);
|
||||||
g_free(priv->alias);
|
g_free(priv->alias);
|
||||||
virJSONValueFree(priv->props);
|
virJSONValueFree(priv->props);
|
||||||
|
g_free(priv->qomPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9550,6 +9551,8 @@ qemuDomainRefreshVcpuInfo(virQEMUDriver *driver,
|
|||||||
vcpupriv->props = g_steal_pointer(&info[i].props);
|
vcpupriv->props = g_steal_pointer(&info[i].props);
|
||||||
vcpupriv->enable_id = info[i].id;
|
vcpupriv->enable_id = info[i].id;
|
||||||
vcpupriv->qemu_id = info[i].qemu_id;
|
vcpupriv->qemu_id = info[i].qemu_id;
|
||||||
|
g_free(vcpupriv->qomPath);
|
||||||
|
vcpupriv->qomPath = g_steal_pointer(&info[i].qom_path);
|
||||||
|
|
||||||
if (hotplug && state) {
|
if (hotplug && state) {
|
||||||
vcpu->online = info[i].online;
|
vcpu->online = info[i].online;
|
||||||
|
@ -316,6 +316,8 @@ struct _qemuDomainVcpuPrivate {
|
|||||||
int thread_id;
|
int thread_id;
|
||||||
int node_id;
|
int node_id;
|
||||||
int vcpus;
|
int vcpus;
|
||||||
|
|
||||||
|
char *qomPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QEMU_DOMAIN_VCPU_PRIVATE(vcpu) \
|
#define QEMU_DOMAIN_VCPU_PRIVATE(vcpu) \
|
||||||
|
@ -692,7 +692,6 @@ struct _qemuMonitorCPUInfo {
|
|||||||
/* alias of an hotpluggable entry. Entries with alias can be hot-unplugged */
|
/* alias of an hotpluggable entry. Entries with alias can be hot-unplugged */
|
||||||
char *alias;
|
char *alias;
|
||||||
|
|
||||||
/* internal for use in the matching code */
|
|
||||||
char *qom_path;
|
char *qom_path;
|
||||||
|
|
||||||
bool halted;
|
bool halted;
|
||||||
|
Loading…
Reference in New Issue
Block a user