mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 22:45:21 +00:00
cpu_arm: Implement virCPUDataNewCopy for arm
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
3d85a14b34
commit
be62707232
@ -150,6 +150,25 @@ virCPUarmDataIsIdentical(const virCPUData *a,
|
|||||||
return VIR_CPU_COMPARE_IDENTICAL;
|
return VIR_CPU_COMPARE_IDENTICAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static virCPUData *
|
||||||
|
virCPUarmDataCopyNew(virCPUData *data)
|
||||||
|
{
|
||||||
|
virCPUData *copy;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
copy = virCPUDataNew(data->arch);
|
||||||
|
copy->data.arm.pvr = data->data.arm.pvr;
|
||||||
|
copy->data.arm.vendor_id = data->data.arm.vendor_id;
|
||||||
|
copy->data.arm.features = g_new0(char *, MAX_CPU_FLAGS + 1);
|
||||||
|
for (i = 0; i < MAX_CPU_FLAGS; ++i)
|
||||||
|
copy->data.arm.features[i] = g_strdup(data->data.arm.features[i]);
|
||||||
|
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virCPUarmDataFree(virCPUData *cpuData)
|
virCPUarmDataFree(virCPUData *cpuData)
|
||||||
{
|
{
|
||||||
@ -696,6 +715,7 @@ struct cpuArchDriver cpuDriverArm = {
|
|||||||
#endif
|
#endif
|
||||||
.decode = NULL,
|
.decode = NULL,
|
||||||
.encode = NULL,
|
.encode = NULL,
|
||||||
|
.dataCopyNew = virCPUarmDataCopyNew,
|
||||||
.dataFree = virCPUarmDataFree,
|
.dataFree = virCPUarmDataFree,
|
||||||
.baseline = virCPUarmBaseline,
|
.baseline = virCPUarmBaseline,
|
||||||
.update = virCPUarmUpdate,
|
.update = virCPUarmUpdate,
|
||||||
|
Loading…
Reference in New Issue
Block a user