VIR_FREE(priv->type);
VIR_FREE(priv->alias);
+ virJSONValueFree(priv->props);
return;
}
VIR_STEAL_PTR(vcpupriv->type, info[i].type);
VIR_FREE(vcpupriv->alias);
VIR_STEAL_PTR(vcpupriv->alias, info[i].alias);
+ virJSONValueFree(vcpupriv->props);
+ VIR_STEAL_PTR(vcpupriv->props, info[i].props);
vcpupriv->enable_id = info[i].id;
vcpupriv->qemu_id = info[i].qemu_id;
char *alias;
virTristateBool halted;
+ /* copy of the data that qemu returned */
+ virJSONValuePtr props;
+
/* information for hotpluggable cpus */
char *type;
int socket_id;
VIR_FREE(cpus[i].qom_path);
VIR_FREE(cpus[i].alias);
VIR_FREE(cpus[i].type);
+ virJSONValueFree(cpus[i].props);
}
}
VIR_STEAL_PTR(vcpus[mastervcpu].qom_path, hotplugvcpus[i].qom_path);
VIR_STEAL_PTR(vcpus[mastervcpu].alias, hotplugvcpus[i].alias);
VIR_STEAL_PTR(vcpus[mastervcpu].type, hotplugvcpus[i].type);
+ VIR_STEAL_PTR(vcpus[mastervcpu].props, hotplugvcpus[i].props);
vcpus[mastervcpu].id = hotplugvcpus[i].enable_id;
/* copy state information to slave vcpus */
char *qom_path; /* full device qom path only present for online cpus */
char *alias; /* device alias, may be NULL for non-hotpluggable entities */
+ /* verbatim copy of the JSON data representing the CPU which must be used for hotplug */
+ virJSONValuePtr props;
+
/* topology information -1 if qemu didn't report given parameter */
int node_id;
int socket_id;
/* name of the qemu type to add in case of hotplug */
char *type;
+ /* verbatim copy of the returned data from qemu which should be used when plugging */
+ virJSONValuePtr props;
+
/* alias of an hotpluggable entry. Entries with alias can be hot-unplugged */
char *alias;
VIR_FREE(entry->type);
VIR_FREE(entry->qom_path);
VIR_FREE(entry->alias);
+ virJSONValueFree(entry->props);
}
VIR_FREE(entries);
return -1;
}
+ if (!(entry->props = virJSONValueCopy(props)))
+ return -1;
+
entry->node_id = -1;
entry->socket_id = -1;
entry->core_id = -1;