mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 01:04:59 +00:00
cpu_ppc64: Implement virCPUDataNewCopy for ppc64
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
be62707232
commit
85c339955c
@ -603,6 +603,23 @@ virCPUppc64DataIsIdentical(const virCPUData *a,
|
|||||||
return VIR_CPU_COMPARE_IDENTICAL;
|
return VIR_CPU_COMPARE_IDENTICAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static virCPUData *
|
||||||
|
virCPUppc64DataCopyNew(virCPUData *data)
|
||||||
|
{
|
||||||
|
virCPUData *copy;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
copy = virCPUDataNew(data->arch);
|
||||||
|
copy->data.ppc64.len = data->data.ppc64.len;
|
||||||
|
for (i = 0; i < copy->data.ppc64.len; ++i)
|
||||||
|
copy->data.ppc64.pvr[i] = data->data.ppc64.pvr[i];
|
||||||
|
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virCPUppc64DataFree(virCPUData *data)
|
virCPUppc64DataFree(virCPUData *data)
|
||||||
{
|
{
|
||||||
@ -768,6 +785,7 @@ struct cpuArchDriver cpuDriverPPC64 = {
|
|||||||
.compare = virCPUppc64Compare,
|
.compare = virCPUppc64Compare,
|
||||||
.decode = ppc64DriverDecode,
|
.decode = ppc64DriverDecode,
|
||||||
.encode = NULL,
|
.encode = NULL,
|
||||||
|
.dataCopyNew = virCPUppc64DataCopyNew,
|
||||||
.dataFree = virCPUppc64DataFree,
|
.dataFree = virCPUppc64DataFree,
|
||||||
.getHost = virCPUppc64GetHost,
|
.getHost = virCPUppc64GetHost,
|
||||||
.baseline = virCPUppc64Baseline,
|
.baseline = virCPUppc64Baseline,
|
||||||
|
Loading…
Reference in New Issue
Block a user