mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00: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->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);
|
||||
|
||||
if (hotplug && state) {
|
||||
vcpu->online = info[i].online;
|
||||
|
@ -316,6 +316,8 @@ struct _qemuDomainVcpuPrivate {
|
||||
int thread_id;
|
||||
int node_id;
|
||||
int vcpus;
|
||||
|
||||
char *qomPath;
|
||||
};
|
||||
|
||||
#define QEMU_DOMAIN_VCPU_PRIVATE(vcpu) \
|
||||
|
@ -692,7 +692,6 @@ struct _qemuMonitorCPUInfo {
|
||||
/* alias of an hotpluggable entry. Entries with alias can be hot-unplugged */
|
||||
char *alias;
|
||||
|
||||
/* internal for use in the matching code */
|
||||
char *qom_path;
|
||||
|
||||
bool halted;
|
||||
|
Loading…
Reference in New Issue
Block a user